~/talk

What Lies Beneath - A Deep Dive Into Clojure's Data Structures

Talkat EuroClojure 2015 · 2015-06-25..06-26· [compilers-and-language-design]
links:none on file
slides:none on file

Explains how Clojure implements persistent maps and vectors using a bitmapped array-mapped trie with 32-way branching (5-bit symbols), bitwise shifting/masking and CPU popcount to turn hash codes into path digits. Claims lookups on huge maps take a handful of steps (roughly 6 hops to a leaf for millions of keys), persistence via path-copying of affected nodes works with excellent sharing, sorted maps use red‑black trees, vectors use a tail pointer for fast conj, and int-map or RRB variants solve heavy-merge and concat/subvec pain points.

AI-written summary · about

  1. 0:00Intro
  2. 0:53TOWERS OF ABSTRACTION
  3. 3:01ABSTRACT DATA TYPE
  4. 4:06THE CHALLENGE
  5. 4:30CHALLENGE ACCEPTED
  6. 5:11KEY IDEAS
  7. 5:21STRUCTURAL SHARING
  8. 6:47HYBRID STRUCTURES
  9. 7:04LETS DIVE IN!
  10. 7:54THE MAP INTERFACE
  11. 8:09WHAT MAKES A GOOD MAP?
  12. 9:08KEY VALUE PAIRS
  13. 9:46TREES TO THE RESCUE
  14. 11:20RED BLACK TREES
  15. 13:03A PRETTY GOOD MAP!
  16. 13:26CONSTRAINTS
  17. 15:07FINITE STATE MACHINE
  18. 15:35LOOKUP TABLES
  19. 16:33NOT A GREAT MAP!
  20. 20:39USING BITMAPS
  21. 23:18A DECENT MAP
  22. 23:53STEP 2
  23. 25:31BIT JUGGLING!
  24. 26:40BEST COMMENT EVER.
  25. 27:20NODE POLYMORPHISM
  26. 27:48EXAMPLE
  27. 29:10REGULAR HASH TABLE?
  28. 29:52INTUITION
  29. 30:42THE TAIL OPTIMIZATION
  30. 34:04Reading List
  31. 34:58QUESTIONS?
~/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.