CxxFunctionBenchmark
CxxFunctionBenchmark copied to clipboard
Long-duration intervals are susceptible to thermal throttling
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.
On the other hand, with smaller intervals CPU may not have enough time to switch from low-clock mode to full speed.
You would probably benefit from using https://github.com/martinus/nanobench instead of custom benchmarking logic.