CxxFunctionBenchmark icon indicating copy to clipboard operation
CxxFunctionBenchmark copied to clipboard

Long-duration intervals are susceptible to thermal throttling

Open potswa opened this issue 10 years ago • 2 comments

On my laptop, relative measurements between libraries on a benchmark may vary by several percent, and times generally increase as the CPU heats up. CPU speed varies from second to second at high load. Results might be more accurate on smaller machines if shorter timeslices are used for the benchmarks.

Presumably the posted results come from a well-cooled workstation, so this only affects DIY users.

potswa avatar Feb 10 '16 04:02 potswa

On the other hand, with smaller intervals CPU may not have enough time to switch from low-clock mode to full speed.

ilyapopov avatar Oct 12 '17 10:10 ilyapopov

You would probably benefit from using https://github.com/martinus/nanobench instead of custom benchmarking logic.

rianquinn avatar Dec 07 '19 15:12 rianquinn