Benchmark time counter improvement
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 1.8k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
Hi,
I checked out some benchmarks and learned about rdtsc instruction. The problem is multiple CPUs in modern architectures and unsyncronized cyclecounters in different CPUs + instruction reordering problem. It cause of inaccuracy in time counting results. More and better the problem and solution approach are wrote in the Intel's whitepaper about benchmarking, Section 3: https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/ia-32-ia-64-benchmark-code-execution-paper.pdf
I'm not sure, that I personally will improve it with cpuid and rdtscp instructions, and that I'll create pull-request with it: i'm solving another problem now. But may be you can improve your cyclecounter approach based on witepaper above for amd64 (x86_64 the same)? As i can see, another frameworks are equal or worst than Google's and this counting quality improvement may be really important.
Contributor guide
Assessment
This issue has not been assessed yet.