~/talk

The Holy Grail! A Hash Array Mapped Trie for C++

Talkat CppCon 2017 · 2017-09-24..09-29· [c-and-cpp]
slides:none on file

Proposes a Hash Array Mapped Trie (HAMT) that gives persistent structural sharing so copies cost two integers and depth for 15M items drops from ~24 (red‑black) to ~5–6, enabling cheap immutable snapshots and atomic root swaps for readers. Provides a C++ reference implementation benchmarked with nonius microbenchmark on libc++; insertion pays full persistence cost (one run shows ~4× slower than std::set and ~20× slower than unordered_set), lookup matches or beats std::set and approaches unordered_set (strings even beat unordered_set). Uses popcount optimization, intrusive ref‑counting, and notes sensitivity to hash distribution, missing deletes and allocator tuning remain to finish.

AI-written summary · about

  1. 0:00Introduction to HAMT
  2. 1:04What is a trie?
  3. 2:30Associative containers overview
  4. 6:29Persistence in data structures
  5. 13:38Hash tables vs red-black trees
  6. 15:27Introducing hash-array mapped trie
  7. 21:53Performance benchmarks
  8. 28:43Optimizing hash distribution
  9. 31:38Bit manipulation in HAMT
  10. 35:45Node structure details
  11. 36:52Shared hash trie concurrency
  12. 39:46Summary and claims
  13. 41:38Q&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.