Lightning Talk: Micro C++ Benchmarks & Murphy's Law
summary
Claims concrete fixes for nanosecond-scale measurements: use rdtsc/rdtscp rather than chrono where possible, disable P-States/C-States/turbo, pin threads and fix frequency so timestamps map to cycles, add memory fences or volatile to prevent reordering, subtract loop and cache-probing overhead from results, and use perf and percentiles (99th) to spot outliers. Reports surprises like L2 reads taking ~30–40 cycles and transient frequency jumps when NUMA and cross-node coherence are involved, plus a working harness that removes many common pitfalls.
AI-written summary · about
related talks
59mCounting Nanoseconds Microbenchmarking C++ Code
05mLightning Talk: Adventures in Benchmarking Timestamp Taking in Cpp
01h 38mKeynote: Benchmarking - It's About Time
01h 11m“Benchmarking C++ Code"
37mC++ as an Optimizing Assembler - a Performance Talk
42mWhen the OS gets in the way
39mMicro Benchmarks
47mBenchmarking C++, From video games to algorithmic trading
