“High Performance Code 201: Hybrid Data Structures"
summary
LLVM replaces heavy std containers with three concrete systems: a small-size-optimized vector that stores early elements inline to avoid heap allocations, an open-addressed quadratically probed set/map using tombstone and empty sentinels, and aggressive pointer packing (pointer-int pairs and a pointer sum type) plus slab-style allocation to get stable, local addresses. The result reduces allocations, boosts iteration throughput (faster than lists for sequential access), fits more data per cache line, and ships in production as LLVM’s practical fast-data solution.
AI-written summary · about
chapters (9)
- 0:00Introduction to High Performance
- 2:13Optimizing Vector Structures
- 6:30Sets and Maps Optimization
- 9:24Allocators vs. Custom Containers
- 13:47Techniques for Object Packing
- 21:59Advanced Bit Packing Techniques
- 28:29Hybrid Data Structures
- 31:45Ordering and Set Vectors
- 36:47Q&A and Performance Insights
related talks
01h 00mMoving Faster: Everyday efficiency in modern C++
01h 01mRefresher on Containers, Algorithms and Performance in C++
01h 01mFaster, Easier, Simpler Vectors
01h 05mFast and small C++ - When efficiency matters
01h 00mCache Friendly C++
37mEnhancing STL containers
01h 02mPractical Memory Pool Based Allocators For Modern C++
58mC++ Performance and Optimisation
