~/talk

Embedded Reflections

Talkat emBO++ 2024 · 2024-03-14..03-16· [compilers-and-language-design]
links:none on file
slides:none on file

Argues that compile‑time reflection plus template metaprogramming produces concrete, faster code today using C++20/constexpr and a Godbolt/EDG prototype of the C++26 proposal. Demonstrates enum→string strategies: if‑else, switch with compiler heuristics (GCC prefers jump tables for clusters of ≥5 cases), and a compile‑time minimal perfect hash using BMI2 pxt (PEXT) hardware hash that maps enums to a packed buffer in about eight cycles. Builds a policy system to choose codegen (policy‑based selection), computes masks for 100 keys in under a second, and shows the approach works with clear size vs speed tradeoffs.

AI-written summary · about

  1. 0:00Introduction to reflection
  2. 1:25Use cases for reflection
  3. 5:28Reflection syntax and power
  4. 9:07Introspection and embedding
  5. 12:21Code injection and state
  6. 18:05Enum naming case study
  7. 22:14Performance trade-offs
  8. 27:16Jump tables and switches
  9. 33:36Optimization heuristics
  10. 40:27Hardware-accelerated hashing
  11. 46:39Conclusion and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.