Lightning Talk: Speeding up code with C++17 Polymorphic Memory Resources
summary
Shows using C++17 polymorphic memory resource to cut heap churn: a custom counting allocator intercepts new/delete and measures 86 allocations and ~13–14 µs on a 20‑byte string. Swapping to a monotonic_buffer_resource drops allocations to 8 and time to ~2.9 µs; preallocating 4 KB gives 1 allocation and ~2.55 µs. A stack‑based buffer yields zero heap allocations and about a 6× speedup. Demonstrates concrete allocator plumbing and pooling that actually works.
AI-written summary · about
chapters (9)
- 0:00Intro
- 0:35Motivation
- 1:34Std library custom allocators
- 3:18My Counting Memory Resource
- 3:30Benchmarks - count standard allocations
- 3:50monotonic_buffer_resource
- 4:05Benchmarks - Add MBR using heap
- 4:28Benchmarks - MBR with heap headstart
- 4:46Benchmarks - check for 'overflow
related talks
49mMost Malleable Memory Management Method in C++
01h 01mGetting Allocators out of Our Way
01h 03mMost Malleable Memory Management Method
01h 01mAllocators: The Good Parts
01h 25mTaming Dynamic Memory - An Introduction to Custom Allocators
01h 01mRecipes for Reducing Allocations by C++ Containers
01h 11mDynamic Memory Allocation Challenges in C++ Safety Critical Systems
01h 04mHow to Write a Custom Allocator
