~/talk

Back to Basics: Virtual Dispatch and its Alternatives

Talkat CppCon 2019 · 2019-09-15..09-20· [c-and-cpp, software-architecture]
links:none on file
slides:none on file

Compares virtual table indirect calls (pointer derefs then indirect call) against CRTP and std::variant with visitor, benchmarks on a 10,000×10,000 pixel image applying a per‑pixel filter on Debian with GCC and Clang, using C++Insights and QuickBench style timing. Finds CRTP gives the best runtime at -O2/-O3, virtual dispatch is measurably slower, and the variant/visitor path sometimes deoptimizes (compiler falls back to runtime dispatch after repeated calls—reported as a bug).

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 1:58What we will cover
  3. 4:25Performance optimization goals
  4. 6:37Dynamic binding and virtual tables
  5. 8:05Tools for benchmarking
  6. 13:24Overhead of virtual tables
  7. 15:33Non-virtual inheritance limits
  8. 17:21CRTP for compile-time polymorphism
  9. 22:30Visitor pattern basics
  10. 26:53Compile-time visitor alternatives
  11. 29:46Limitations of Concepts
  12. 30:30Benchmark setup
  13. 31:40Performance results analysis
  14. 34:35Trade-offs in design choices
  15. 35:46Future of compile-time polymorphism
  16. 36:38Q&A session
~/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.