Replies: 1 comment 1 reply
-
This seems unusual. What functions? Note that some functions are variable-time. How many benchmark iters are you using when you see this large variance? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Using wall-clock time seems problematic because it includes OS scheduling delays, interruptions from other processes, and other system noise, which are irrelevant to the actual computational cost of the library’s operations. Wouldn’t measuring CPU time give a far more precise and reliable metric of performance?
I'm running benchmarks on my machine and I see oscillations of +50% on some functions (with turboboost disabled, with CPU frequency fixed at 3 Ghz). It seems currently totally unreliable.
Yes, I can pin the process to a cpu core, but I can't prevent that core from handling other programs. Also, even if I somehow manage to have a core running only my benchmark and nothing else, I would still have caching issues because modern CPUs have shared caches between cores.
I think something like
CLOCK_PROCESS_CPUTIME_ID
would be way betterBeta Was this translation helpful? Give feedback.
All reactions