speedb icon indicating copy to clipboard operation
speedb copied to clipboard

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

Open ColinIanKing opened this issue 1 year ago • 1 comments

…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.

ColinIanKing avatar Jun 12 '24 15:06 ColinIanKing

@ColinIanKing please add a record to HISTORY.md

ofriedma avatar Jun 26 '24 10:06 ofriedma