~/talk

[normalized Sound] A deep dive into dispatching techniques

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

Benchmarks many dispatch styles (switch/binary-search, jump tables, function-pointer threading, computed-goto token threading, tail-call chaining and inline fusion), shows generated assembly and uses hyperfine and perf on an M1 Mac Mini and a 2016 ThinkPad to compare. Claim: tail-call/token/threading plus careful register use often halves runtime on M1, but jump tables and direct-target bytecode blow up Branch‑Target misses on the older ThinkPad, so compiler choices and a clang-only tail-call attribute matter. Lots of microbench numbers, tool commands, and assembly snippets; implementations and tradeoffs are shown and measured.

AI-written summary · about

  1. 0:00Start
  2. 0:47Dispatch Loop
  3. 6:32Execute instructions
  4. 8:39Idea: switch over opcode
  5. 13:40Interlude: Instruction pipeline
  6. 22:18Duplicated dispatch code
  7. 29:03Interlude: register keyword
  8. 31:40An instruction with a slow path
  9. 39:06Actual actual generated assembly for a switch
~/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.