Small is beautiful: Techniques to minimise memory footprint
summary
Describes a compact pointer class that stores addresses relative to data or stack bases, using configurable bit widths (example: 36-bit pointers) so tree nodes drop from 24 to 15 bytes — about 9 bytes saved per node — with decompression done by one mask, one shift and one add. Shows wrappers that behave like normal pointers (new/delete still work). Presents fractional-bit packing using mixed-radix (products of value ranges) computed at compile time with templates/constexpr so many small enums fit with zero padding.
AI-written summary · about
chapters (4)
- 0:00Introduction to memory footprint
- 2:49Pointer compression techniques
- 19:31Bit-field optimization methods
- 30:10Summary and trade-offs
related talks
01h 05mFast and small C++ - When efficiency matters
01h 03mFast and Small C++ - When Efficiency Matters
14mMemory Optimization through Structure Packaging
56m“High Performance Code 201: Hybrid Data Structures"
01h 00mMoving Faster: Everyday efficiency in modern C++
55mCode Size Compiler Optimizations and Techniques for Embedded Systems
01h 01mFaster, Easier, Simpler Vectors
16mWriting Optimized Solana Programs
