~/talk

Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!

Talkat CppCon 2015 · 2015-09-21..09-25· [c-and-cpp]
slides:none on file

Live microbenchmarks use google/benchmark and show 22M iterations reporting ~32ns but still noisy; reserving a vector unexpectedly makes push_back about ten times faster in one example. Analysis uses perf recordings, annotated assembly and callgraphs, plus an inline-assembly escape to prevent optimizer elimination; profiling requires -fno-omit-frame-pointer for reliable stacks. Sampling can misattribute cost (modulo attributed to a store), LBR has tradeoffs, and Intel Architecture Code Analyzer helps validate where hot cycles actually occur.

AI-written summary · about

  1. 0:00Start
  2. 0:01Tuning C++ Benchmarks, and CPUs, and Compilers! Oh My!
  3. 2:20Performance Matters
  4. 3:30What C++ code should you tune?
  5. 9:43Measure first, tune what matters
  6. 10:14Macro Benchmarking
  7. 10:42Micro Benchmarks
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.