~/talk

Runtime Polymorphism: Back to the Basics

Talkat CppCon 2017 · 2017-09-24..09-29· [software-architecture]
links:none on file
slides:none on file

Explores concrete alternatives to inheritance by implementing a policy-based type erasure (the Dyno library) that supports remote storage, small‑buffer (16‑byte) SBO and local storage and lets the Vtable be remote, partially inlined, or fully inlined. Builds hand‑rolled and Dyno versions, runs microbenchmarks showing heap allocations dominate cost and that hitting the 16‑byte SBO cutoff drops creation cost dramatically; finds Vtable inlining increases object size and often slows calls, so tradeoffs depend on storage, dispatch placement and measured workloads.

AI-written summary · about

  1. 0:00Introduction to polymorphism
  2. 2:55Drawbacks of inheritance
  3. 6:15Designing a better alternative
  4. 10:17Implementing manual erasure
  5. 14:03Using the 'dyno' library
  6. 16:52Small buffer optimization
  7. 21:46Performance benchmarks
  8. 23:55Fixed-size storage policy
  9. 27:39More benchmarks and analysis
  10. 32:14Non-owning storage
  11. 35:08Shared storage
  12. 36:32Real-world type erasure
  13. 40:29Inlining the v-table
  14. 44:17Partial v-table inlining
  15. 46:10Assembly and optimization
  16. 49:12Iterator optimization case
  17. 51:55The future of polymorphism
  18. 55:30Summary and conclusion
  19. 57:33Q&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.