C++ Cache Friendly Data + Functional + Ranges = ❤️
summary
Claims an ergonomic C++ wrapper that gives the speed of structs‑of‑vectors with normal tuplelike and range APIs, using modern features (ranges, structured bindings, tuple_size/get specialization, concepts, constexpr arrays). Demonstrates raw numbers: a naive array-of-structs run shows ~2.5B cache references and ~2.4s, a hand‑written struct‑of‑vectors drops to ~640M refs and ~2.2s, and the ergonomic table abstraction runs ~1.6s with far fewer cycles. Implements struct-of-vectors abstraction, stable row id via index+reverse-index, iterator-as-offset, and select/apply column projection; the library exists on GitHub and the approach works and measures faster.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:30ECS data storage inspiration
- 2:16Cache lines and access patterns
- 5:09Struct vs SoV performance
- 8:43Ergonomics challenges
- 13:04Stable row IDs need
- 17:21Implementing row IDs
- 21:46Row ID maintenance impact
- 25:05Adding iterator interface
- 30:37Row IDs from iterators
- 35:04Selecting columns
- 45:29Calling functions on columns
- 52:31Summary
related talks
01h 05mBetter C++ ranges
01h 04mEffective Ranges: A Tutorial for Using C++2x Ranges
56mThrowing Tools at Ranges
01h 00mMissing (and future?) C++ range concepts
57mHow to Design a Slimmer Vector of Variants in C++
01h 02mImplementing static_vector: How Hard Could it Be?
01h 06mConquering C++20 Ranges
01h 04mRange adaptors - 5 years after C++20
