~/talk

“A Semi Compile/Run-time Map with (Nearly) Zero Overhead Lookup”

Talkat CppCon 2018 · 2018-09-23..09-28· [compilers-and-language-design]
links:none on file
slides:none on file

A semi compile-/run-time associative map stores where values live at compile-time using a templated global and constexpr lambda keys, then uses static local storage with placement new and std::launder to avoid UB; loading/storing values remains runtime and a runtime std::map of pointers provides a fallback. Lookups for compile-time keys compile down to a single machine instruction (global access speed). Compiles cost: ~20–30s for 1,000 keys, minutes for ~10,000; implementation uses unique_ptr with custom deleter for cleanup.

AI-written summary · about

  1. 0:00Introduction
  2. 0:42Java wrapper performance issue
  3. 3:13Semi Map requirements
  4. 4:42Templated global storage
  5. 7:36Key to unique type mapping
  6. 9:01Wrapper class design
  7. 10:07Performance results
  8. 11:54Static local initialization
  9. 14:03Undefined behavior fix
  10. 15:48Runtime map integration
  11. 17:59Static vs instance storage
  12. 19:46Non-static map approach
  13. 21:30Benchmark comparison
  14. 22:33Compile-time trade-offs
  15. 23:16Q&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.