Enhancing STL containers
summary
Shows a custom container that keeps objects in a flat internal storage but swaps only integer indexes so reordering avoids moving payloads, implements iterator wrappers and a specialized swap so algorithms like std::sort work unchanged, measures on 10,000 elements of ~10 KB each with reverse+sort repeated 10 times and reports about 50x speedup on that benchmark, demonstrates iterator wrapper, specialized swap, and an alignment trick that gives ~20% improvement for tight byte loops.
AI-written summary · about
chapters (11)
- 0:00Introduction to STL enhancements
- 3:43Object-oriented vs generic programming
- 9:31Problems with standard containers
- 15:01Index-based object storage solution
- 17:35Demo of performance improvements
- 23:58Implementation details
- 25:50Alex Stepanov's perspective
- 26:56Object-oriented container design
- 29:28Memory alignment optimization
- 33:34Future of STL enhancements
- 36:12Q&A and project invitation
related talks
47mUnderstanding And Mastering Flat Containers
32mC++ Standard Library "Little Things”
56m“High Performance Code 201: Hybrid Data Structures"
59mStrongly Typed Containers
01h 00mSTL Algorithms - why you should use them, and how to write your own
36mInterfaces Matter
01h 00mBuilding and Extending the Iterator Hierarchy in a Modern, Multicore World
01h 02m“How to Choose the Right Standard Library Container, and Why You Should Want Some More”
