🌳 Judy Array: The Cache-Conscious Adaptive Trie
Explore the Judy array, a sparse associative array and sorted-integer-set structure that adapts its internal node representation to data density, delivering hash-table speed with sorted order and low memory overhead.
The simulator visualizes a Judy-style radix trie as keys are inserted, showing each node's current representation, linear list, bitmap, or full array, and how nodes automatically convert between these forms as their child count crosses density thresholds, alongside a running comparison of Judy's estimated memory footprint versus a naive fixed-array trie and a hash table storing the same keys.
🔬 What It Demonstrates
The simulator visualizes a Judy-style radix trie as keys are inserted, showing each node's current representation, linear list, bitmap, or full array, and how nodes automatically convert between these forms as their child count crosses density thresholds, alongside a running comparison of Judy's estimated memory footprint versus a naive fixed-array trie and a hash table storing the same keys.
🎮 How to Use
Insert integer keys one at a time or in bulk to watch the trie grow level by level, and click on any node to see its current representation and byte-value contents highlighted alongside the neighboring node types it could convert to. Toggle range-query mode to select two bounds and watch the simulator highlight exactly which nodes and leaves are visited to enumerate the ordered keys in that range, then compare that against the equivalent operation on the hash table panel to see why hash tables cannot perform it directly.
💡 Did You Know?
Judy arrays are named after Doug Baskins's daughter, and despite being over two decades old, the design's ideas live on today, since modern datastore and search-engine internals, as well as some standard library associative container implementations, use closely related adaptive radix trie techniques for exactly the memory and cache benefits explored in this lab.
Explore the Judy array, a sparse associative array and sorted-integer-set structure that adapts its internal node representation to data density, delivering hash-table speed with sorted order and low memory overhead.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install