Counting Nanoseconds Microbenchmarking C++ Code
summary
Microbenchmarks measure real claims: a 10k-int min_element microbenchmark uses RDPMC and PAPI and LLVM‑tools to show a loop‑carried dependency collapses IPC and stalls pipelines. Using LLVM‑MCA to inspect microops and removing the dependency (value iteration / inlining / parallel minima) raises IPC from ~0.8 to about 3 and cuts cycles per iteration toward ~1.0. Perf and rdpmc demos run on tuned hardware (P‑states/C‑states/turbo off, HT off); the demos and numbers validate the fixes.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 0:16Why fast code matters
- 2:20What is microbenchmarking
- 5:52Why microbenchmarking
- 8:37Time
- 12:16Tools
- 17:43IPC vs Micro
- 28:13Example code
- 34:22Results
- 36:50Assembly
- 38:20LLVM MCA
- 49:20Microbenchmarking
- 50:10TSE
- 53:15Hypers straining
- 57:10Conclusion
related talks
05mLightning Talk: Micro C++ Benchmarks & Murphy's Law
39mMicro Benchmarks
01h 38mKeynote: Benchmarking - It's About Time
01h 11m“Benchmarking C++ Code"
01h 29mWhen Nanoseconds Matter: Ultrafast Trading Systems in C++
37mC++ as an Optimizing Assembler - a Performance Talk
47mMisnomers About Microbenchmarks
47mBenchmarking C++, From video games to algorithmic trading
