~/talk

Your New Mental Model of constexpr

Talkat CppCon 2021 · on Monday, 2021-10-25· at 11:00· online· [typescript]
slides:none on file

Claim: constexpr is best viewed as moving work from runtime to compile time along a constexpr continuum (0–100%). Tools and standards: C++20 features, CTRE, constexpr dynamic allocation, static constexpr and lambdas, Compiler Explorer to inspect output. Surprising numbers: demos shrink runtime assembly from ~160 to ~35 lines and move 40/60/80/100% of work to compile time. Built artifacts: a Commodore 64 slideshow rendered mostly at compile time and a constexpr ARM emulator that executes instructions at compile time; both work but require known compile-time inputs and careful memory/tradeoff choices.

AI-written summary · about

  1. 0:00Introduction and definition
  2. 1:49Constexpr vs. metaprogramming
  3. 3:22Evolution of constexpr
  4. 7:29The constexpr continuum
  5. 11:03Practical implementation approach
  6. 15:06Case study: string and font processing
  7. 20:20Optimizing presentation logic
  8. 22:49System-wide constexpr integration
  9. 27:52Live coding demonstration
  10. 44:04Q&A and advanced discussion
~/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.