~/talk

My favorite (constexpr) data structures

Talkat NDC TechTown 2024 · 2024-09-09..09-12· [c-and-cpp]
slides:none on file

A Clank interpreter models the constexpr abstract machine using an AP value (an arbitrary‑precision, variant‑style runtime value) and symbolic addresses, which lets std::vector and std::string become constexpr but leaves list, deque and associative containers behind because of pointer provenance, pointer comparison and hashing rules. Key blockers are lack of pointer tagging, no constexpr atomics or variable‑sized object storage and lifetime/temporary rules. Favorite structure is an HH array mapped trie — compressed bitmap nodes giving O(1) lookup and cheap persistence via refcounts — which needs pointer tagging and constexpr atomics to be practical.

AI-written summary · about

  1. 0:00Introduction
  2. 1:32Constexpr data structures matter
  3. 3:23Clang’s constexpr interpreter basics
  4. 9:06Pointer provenance in symbolic execution
  5. 13:50Lvalues vs rvalues in Clang’s interpreter
  6. 17:48Implementing features in interpreter
  7. 20:38Standard library containers and constexpr
  8. 27:32Why only vector and string are constexpr
  9. 28:16Atomic operations and control flow
  10. 31:39Variables in constexpr evaluation
  11. 34:13Virtual functions and exceptions
  12. 37:29Pointer-based containers challenges
  13. 39:17Favorite data structure: HAMT
  14. 47:56Q&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.