Skip to content

db_bench: optimize Done, replace slow divisions with addition/subtrac…#861

Open
ColinIanKing wants to merge 1 commit into
speedb-io:mainfrom
ColinIanKing:main
Open

db_bench: optimize Done, replace slow divisions with addition/subtrac…#861
ColinIanKing wants to merge 1 commit into
speedb-io:mainfrom
ColinIanKing:main

Conversation

@ColinIanKing

Copy link
Copy Markdown

…tions

There are two slow 64 bit division operations that are computationally quite expensive. Replace these with a modulo style counter that uses simpler and faster increment, comparision and subtraction operations. On a 60 second run, this optimization reduced the function CPU utilization from 21.8 seconds down to 2.3 seconds on an i7-6700 as measured using Intel vtune.

…tions

There are two slow 64 bit division operations that are computationally quite
expensive. Replace these with a modulo style counter that uses simpler and
faster increment, comparision and subtraction operations. On a 60 second
run, this optimization reduced the function CPU utilization from 21.8 seconds
down to 2.3 seconds on an i7-6700 as measured using Intel vtune.

Signed-off-by: Colin Ian King <colin.king@intel.com>
@Yuval-Ariel
Yuval-Ariel requested a review from ofriedma June 25, 2024 07:53
@ofriedma

Copy link
Copy Markdown
Contributor

@ColinIanKing please add a record to HISTORY.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants