~/talk

A Tour of Polymorphism Techniques in C++

Talkat C++ on Sea 2023 · 2023-06-28..06-30· [c-and-cpp]
links:none on file
slides:none on file

Compares concrete C++ techniques: measured a simple draw loop with virtual functions costing about 88 ms per iteration versus a CRTP compile‑time approach around 5 ms, and a variant-based visitor that runs ~266 ms on GCC 11 but becomes much faster on GCC 12; uses Compiler Explorer to inspect generated code and shows that implementations (vtable vs optimized variant code) drive the overhead; covers CRTP, modern concepts as a clearer compile-time interface, and practical build-time choices.

AI-written summary · about

  1. 0:00Introduction to polymorphism
  2. 1:44Polymorphism and overhead
  3. 5:31Virtual function performance
  4. 14:24Alternative implementations
  5. 21:00Virtual function analysis
  6. 30:05Compile-time interfaces
  7. 39:10Using std::variant
  8. 49:20Conclusion and best practices
~/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.