~/talk

Embracing (and also Destroying) Variant Types Safely

Talkat CppCon 2021 · on Thursday, 2021-10-28· at 09:00· online· [rust]
slides:none on file

Claims concrete tradeoffs: variant layout uses alignas plus a raw storage buffer and an active index, and destruction dominates performance so a poor destructor costs real money — an experiment cites a 0.5% homepage slowdown at scale. Three destruction strategies appear: linear runtime chain, mixed compile/runtime binary search (quadratic instantiations risk CI OOM), and an index-to-function table (constant time but optimization barriers). Also covers template deduction rules (greedy matching, fair matching) and argues for a type_sequence proposal to simplify metaprogramming.

AI-written summary · about

  1. 0:00Intro
  2. 0:36Remote Work
  3. 3:05Slave
  4. 4:11Sponsorship
  5. 4:28Agenda
  6. 5:27Variatics
  7. 8:44Verdicts
  8. 11:28Verdicts are difficult
  9. 13:31Kinds
  10. 19:26Type Sequence
  11. 29:08Fair Matching
  12. 36:18Variants Everywhere
  13. 43:16Implementation
  14. 44:14Variant Alternative
  15. 46:45Linear Search
  16. 48:19Binary Search
  17. 48:56Runtime Binary Search
  18. 50:13Constant Given Index
  19. 50:51Constant Given Time
  20. 52:28Algorithm Selection
  21. 54:38Mixed Mode
  22. 56:38New Era
  23. 57:16Questions
~/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.