~/talk

CPU Cache Effects

Talkat Meeting C++ 2022 · 2022-11-17..11-19· [web-performance]
links:none on file
slides:none on file

Benchmarks show concrete numbers: tight loops hit ~12–13 billion ops/s until they outgrow L1 and drop to ~2 billion ops/s once hitting RAM, and L1 hits cost ~4–5 cycles (~2–3 ns). Experiments demonstrate a ~3× speedup for large memset when using non-temporal stores, explain 64-byte cache line effects (stride and alignment matter), expose associativity pitfalls that cause ~10× slowdowns for power‑of‑two strides, and measure memory parallelism at about 13–17 concurrent memory ops; use perf and cachegrind to reproduce.

AI-written summary · about

  1. 0:00CPU cache importance
  2. 1:02Memory access time
  3. 3:51Optimizing memory efficiency
  4. 5:39Measuring memory bandwidth
  5. 10:23Read vs write bandwidth
  6. 13:14Non-temporal memory accesses
  7. 17:35RAM vs CPU cache bandwidth
  8. 18:39Measuring memory latency
  9. 23:32Cache lines impact
  10. 25:37Counting cache lines
  11. 26:21Memory alignment design
  12. 32:30Memory level parallelism
  13. 35:02Memory parallelism in data structures
  14. 36:26Pointers vs indices
  15. 39:17Shared caches performance
  16. 41:05Measuring multi-threaded bandwidth
  17. 45:43Cache prefetching
  18. 51:24Cache associativity anomalies
  19. 1:02:34Further resources
~/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.