Frictionless Allocators
summary
Shows that custom allocators deliver real wins — microbenchmarks report 3–5x speedup and a modeled Bloomberg pipeline sees about a 25% speedup in motor — and argues the friction is language, not algorithm. Proposes implicit allocator awareness and a compact using syntax allocator injection so constructors, factory returns and variable declarations get the right pmr allocator automatically. Prototype work on a Circle front end proves the syntax passes allocators through existing library code; next steps are std2 string/vector implementations and wider experiment.
AI-written summary · about
chapters (34)
- 0:00Intro
- 0:47Outline of Talk
- 1:25What is an allocator?
- 2:04Why Do We Want Allocators?
- 2:55A Faster Allocator
- 3:52Performance
- 7:02Special Memory
- 7:59Emery Berger
- 8:40Accelerating Programs via Custom Allocators
- 9:00Initial empirical results
- 9:56Early Results
- 11:24Allocator Traits (since 2011)
- 15:56How does pmr work?
- 16:42memory_resource
- 18:30Standard Resources
- 20:46Idiom and usage of pm
- 24:17Quick Example
- 26:23Scoped Allocator Model
- 32:45Limitations of pmr
- 34:26Bloomberg Experience
- 35:27Unsupported use cases
- 37:34Allocator Propagation
- 38:26Complexity of Propagation
- 39:22Syntactic overhead is high
- 41:44Copy Constructor Issue
- 42:36Ideal Model
- 44:17Allocator Awareness
- 45:20Why Implicit from Members?
- 46:55Why querying matters
- 49:41Simplifying Construction
- 51:06Worked Example
- 54:44Implementing Awareness
- 56:38Implicit Awareness
- 57:57Allocator Injection
related talks
01h 01mGetting Allocators out of Our Way
01h 13mValue Proposition: Allocator-Aware (AA) Software
57m“An allocator model for std2”
01h 01mAllocators: The Good Parts
01h 31mAllocator-Aware (AA) Software
01h 01mRecipes for Reducing Allocations by C++ Containers
01h 04mHow to Write a Custom Allocator
01h 25mTaming Dynamic Memory - An Introduction to Custom Allocators
