~/talk

“Want fast C++? Know your hardware!"

Talkat CppCon 2016 · 2016-09-18..09-23· [web-performance]
links:none on file
slides:none on file

C++ performance depends on hardware patterns not just algorithms: traversing a 2D array in the wrong order gives about 30–40x slowdown on tested MacBooks; random indexing is random access >100x slower than linear scans despite identical work; cache lines (16/64 B) and associativity create 20x drops at power‑of‑two strides; unaligned accesses cost ~3x on older CPUs; sorting can expose branch‑predictor wins (MSVC shows ~6x), SIMD needs align to cache line, and denormals stall ~30x; benchmarks use clang/gcc/MSVC and Google Benchmark.

AI-written summary · about

  1. 0:00Intro
  2. 4:36the rest of this talk
  3. 7:212d array traversal, 10 MB array
  4. 12:252d array traversal + some work
  5. 15:052D Array traversal: time profile Xcode Instruments
  6. 18:24temporal cache coherency
  7. 23:01accessing every Nth array element
  8. 24:58cache associativity
  9. 31:47unaligned memory access
  10. 33:15aligned vs. packed data access
  11. 40:05"harmless" branches
  12. 41:32virtual function calls
  13. 44:10sharing between cores
  14. 49:31data dependencies
  15. 55:08loop vectorisation - clang
~/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.