Benchmarking C++, From video games to algorithmic trading
summary
Claimed single-run fizzbuzz latency measures ~98 ns on a Xeon using Google Benchmark and wire-to-wire hardware timestamps that are single-digit nanoseconds; collection writes text logs into a time-series DB, visualizes percentiles and fat tails in Jupyter notebooks, and pins cores to stabilize runs. Examples include a World of Tanks replay system repurposed for perf regression testing, Chrome tracing flame graphs, Tarantula-style path traces, and eliminating needless string conversions to drop the hot-path cost to near zero.
AI-written summary · about
chapters (31)
- 0:00Intro
- 0:28Quiz. How long it takes to run ?
- 1:56Outline
- 3:29Why performance matters?
- 6:33Game loop
- 8:28Performance challenges in games
- 10:34How games tackle performance
- 11:49World of Tanks
- 14:52Replays: problems
- 20:32Money loop
- 21:28Performance challenges in trading
- 23:24How trading measures latency
- 24:25Using timestamps
- 24:49Lightweight tracing
- 25:27Low Latency Fizzbuzz
- 27:28Request processing
- 28:59Using Epoch
- 29:38Timings output
- 30:16Macro benchmark
- 30:41Quick feedback
- 32:25Jupyter notebooks
- 33:51Histogram as text
- 34:30Beware of outliers
- 35:48Discarding outliers
- 36:26Bimodal distribution
- 37:58Optiver profiler
- 38:53Tarantula
- 40:54Optimisation
- 42:07Look at high level
- 45:02Questions?
- 46:38Avoid int- string conversion
related talks
01h 11m“Benchmarking C++ Code"
01h 29mWhen Nanoseconds Matter: Ultrafast Trading Systems in C++
01h 04mDeveloping the Bloomberg Terminal -- Local performance & measurement techniques
48mFantastic Performance and Where to Find It
33mReaching Ludicrous Speed
40mLudicrous Speed: Designing For Performance on the JVM
05mLightning Talk: Micro C++ Benchmarks & Murphy's Law
01h 38mKeynote: Benchmarking - It's About Time
