~/talk

Instruction Level Parallelism in Your C++ Program

Talkat Core C++ 2023 · 2023-06-05..06-07· [c-and-cpp]
links:none on file
slides:none on file

Modern CPUs expose instruction-level parallelism (ILP) but code, not hardware, limits it: short dependency chains (e.g., elementwise add) run in ~7 cycles, while a reduction or linked‑list walk costs ~n+3 cycles or ~3n cycles because loads add latency. Interleaving independent chains can nearly double throughput (runtime ratio → 2), unrolling/splitting accumulators increases ILP, and converting trees/lists to arrays or unrolled nodes removes chain latency (array lookups win past ~256k). Use llvm-mca to inspect latency vs throughput and apply interleaving or breaking chains.

AI-written summary · about

  1. 0:00Introduction to CPUs
  2. 0:28Executing instructions
  3. 1:31Instruction dependencies
  4. 2:45Impact of dependencies
  5. 3:45Loop performance quiz
  6. 6:44Loop carry dependencies
  7. 8:18Linked list performance
  8. 10:20ILP and code quality
  9. 12:33Throughput vs latency
  10. 16:47Techniques to increase ILP
  11. 19:47Interleaving technique
  12. 22:45Parallel tree lookups
  13. 29:03Interleaving tradeoffs
  14. 35:03Shortening dependencies
  15. 39:03Data structures and ILP
  16. 43:57Reducing algorithm passes
  17. 45:16Breaking dependencies
  18. 48:13Array-based trees
  19. 50:12In-order processor constraints
  20. 55:54Performance analysis tools
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.