~/talk

C++ Performance and Optimisation

Talkat NDC Oslo 2017 · 2017-06-14..06-16· [web-performance]
links:none on file
slides:none on file

Starts with profiling to find silly hotspots then moves to concrete fixes: eliminate repeated allocations (malloc costs 200–500 cycles), collapse memcopies, use reserve to turn 25 allocations into 1 for a 10M-element vector, prefer move semantics to avoid copies, and separate hot/cold fields to get dense linear access for vectorization. Uses tooling like perf, valgrind cachegrind and Google Benchmark to measure cache misses, shows unordered_map vs map tradeoffs, and emphasizes memory bandwidth and cache layout as the dominant performance levers.

AI-written summary · about

  1. 0:00Start
  2. 4:19The performance story
  3. 6:15Overview
  4. 8:05Donald Knuth, 1974 (premature optimization paper)
  5. 9:34Modem CPUs
  6. 13:46Instructions are "free", memory b/w isn't
  7. 15:32Cache hierarchy
  8. 20:57Performance tools
  9. 22:34Data layout and performance
  10. 24:34Vectorisation (2)
  11. 26:33Strength reduction
  12. 27:32Move semantics and value references
  13. 28:33Move semantics example
  14. 29:48Implementing move semantics
  15. 35:57Optimisation - hash function
  16. 37:37Domain knowledge
  17. 41:22Non-primary key access
  18. 42:22Range scans and sexuential access
  19. 43:50Read/write ratio
  20. 44:33Working set size
  21. 45:54Consistency
  22. 46:51Strings - implementation choices
  23. 57:38Summary
~/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.