Cache friendly data + functional + ranges = ❤️
summary
Shows a compact C++23 library (built with clang 18 and measured with perf) that replaces a vector-of-structs with structs of vectors and a templated table API. Measured numbers: vector-of-structs ~2.6s with ~2.5B cache refs, manual struct-of-vectors ~2.2s with 641M refs, templated table ~1.6s. Adds a stable row ID index (index + reverse index) that costs work on heavy removals, an iterator/ranges interface, column-subset selection and a select/apply higher-order helper. Code on GitHub; prototype works and often runs noticeably faster.
AI-written summary · about
chapters (18)
- 0:00Introduction
- 1:24About the speaker and their work
- 3:08Data-oriented inspiration
- 4:10Cache-friendly layout
- 6:39Struct vs vector-of-structs
- 11:28Cache-friendly table
- 16:13Stable row IDs
- 23:26Index management challenges
- 25:48Iteration performance
- 27:31Row IDs and lookups
- 27:54Iterator design
- 31:53Iterators with ranges
- 34:19Row IDs from iterators
- 38:44Column selection
- 46:38Column selection impact
- 47:00Functions with columns
- 53:45Summary and demo
- 56:16Q&A
related talks
54mThrowing Tools at C++ Ranges
01h 31mDesigning a Slimmer Vector of C++ Variants
05mMaximising Throughput & Minimising Latency in High-Performance C++ Code
01h 09mMissing (and future?) C++ Range Concepts
40mImmutable Data Structures in C++
58mRefresher on Containers, Algorithms and Performance
49mAlgorithmic and microarchitecture optimizations of C++ applications
01h 15mHow to Rangify Your Code
