~/talk

Type Erasure - The Implementation Details

Talkat Meeting C++ 2023 · 2023-11-12..11-14· [rust]
slides:none on file

Argues that type erasure gives value semantics and fewer dependencies than inheritance and demonstrates two ~20‑line Type Erasure Wrappers (owning and non‑owning), a stack‑friendly small‑buffer implementation and a shape view that avoids allocations. Benchmarks use 10,000 randomly generated shapes with 25,000 translate ops on an 8‑core Intel i7 (GCC/Clang); SBO yields about a 10% speedup in the presented run, manual replacement of virtual dispatch helps on some compilers but not all. Code compiles, runs, and preserves usability while enabling further optimizations.

AI-written summary · about

  1. 0:00Introduction
  2. 1:47Motivation and design
  3. 8:11Shape example and pattern
  4. 16:21Modernizing with wrapper
  5. 28:06Simplifying with value semantics
  6. 31:43Implementation details and dependencies
  7. 32:26Performance and benchmarks
  8. 35:18Small buffer optimization
  9. 47:29Advanced optimizations
  10. 51:18Virtual functions without overhead
  11. 56:16Summary
  12. 57:41Q&A
~/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.