Optimizing memory use in markdown parser

· · Aug. 22, 2026, 10:52 p.m.
Summary
The post details the optimization of a C++ markdown parser, reducing memory usage from 232 bytes per Node to 16 bytes. Key techniques include pointer compression, efficient struct field arrangement, and in-place string resizing. Benchmarks demonstrate significant memory savings and retained speed, highlighting the importance of structured measurement in optimizations.