~/talk

Practical Production-Proven Constexpr API Elements

Talkat C++ on Sea 2024 · 2024-07-02..07-05· [software-architecture]
slides:none on file

A production C++ library (published on GitHub, built with Bazel) implements MBO library techniques to move runtime containers into constexpr: uninitialized scratch unions, optional destructor suppression, and placement construction to create limited_vector/limited_set/limited_map that are compatible with STL idioms. Code generation uses Python templates and clang-format; experiments use Compiler Explorer and Loop unrolling (up to 32) for an optimized index_of. Deployment touches ~33% of hot code and yields a 1% overall improvement (≈3% effective), with many microbenchmarks showing STL sometimes remains faster and Apple M2 cache behavior surprising.

AI-written summary · about

  1. 0:00constexpr API elements
  2. 1:31constexpr in production
  3. 4:00C++ constexpr limits
  4. 6:31constexpr functions basics
  5. 13:02constexpr examples and pitfalls
  6. 20:09Hash functions constexpr
  7. 24:24constexpr constructors
  8. 27:32Containers memory constraints
  9. 32:12constexpr-compatible containers
  10. 39:51Production use cases
  11. 53:44Limited vector implementation
  12. 1:01:15Limited set and map
  13. 1:04:06Deployment performance
  14. 1:12:13Q&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.