Implementing Understandable World Class Hash Tables in C++
summary
Claims world‑class performance backed by open source code, microbenchmarks and Compiler Explorer disassembly: a Robin Hood probing invariant implemented with SIMD/SWAR metadata comparisons and hoisted hash + probe‑sequence bits yields very small false positive rates and deterministic probing (max PSL ≈ log2 N). Results show sustained high load factors (reported 99.9% load factor) and dramatic lookup speedups (better than 10× versus std::unordered_map on their benchmarks). Implementation details include aligned/unaligned SWAR finds, journaled evictions, and pragmatic cost‑model tuning; code and numbers are available to inspect.
AI-written summary · about
chapters (35)
- 0:00High-performance hash tables intro
- 1:52Fast hash table requirements
- 2:55Open addressing vs chaining
- 4:19Robin Hood probing hash tables
- 6:06Robin Hood fundamentals
- 8:59Find and delete in Robin Hood tables
- 11:05Robin Hood advantages
- 12:10Existing Robin Hood implementations
- 13:56High-performance design strategies
- 17:28SWAR parallelism in hash ops
- 20:38SIMD register experiments
- 21:00Generic programming abstractions
- 23:26Instruction cost models revision
- 26:14High load factor design
- 27:20Metadata and data layouts
- 29:04Dynamic config goals
- 29:26Metadata packing and SWAR
- 32:33Aligned find with SWAR needles
- 35:45Hash functions scatter and hoist
- 36:51Reducing branches for predictability
- 40:48Insertion with SWAR causality
- 42:57Eviction chains in insertions
- 44:24Journaling key moves
- 45:29Avoiding division in hot paths
- 46:13Deletion shifting and tombstones
- 46:35Resizing without full rehash
- 48:02Benchmark results metrics
- 50:13Complex key comparisons perf
- 51:35Insertion perf across configs
- 52:429% load factor benchmarks
- 53:25Compiler challenges optimizations
- 56:39Autistic code branch-free
- 58:03Find termination conditions
- 58:45Future work production
- 59:47Q&A on Robin Hood ops
related talks
56mWhat we know about hashes
14mSEPH: Scalable, Efficient, and Predictable Hashing on Persistent Memory
01h 03m#Hashing (Hashing Values)
55mSort vs Hash A Duality
59mA Hash Map for Graph Processing Workloads & a Methodology for Transactional Data Structures
40m"Gaining Constant time Lookup over Unorganized Data"
24mWrite-Optimized Dynamic Hashing for Persistent Memory
01h 13mC++ Memory Model Meets High-Update-Rate Data Structures
