Engineering High-Performance Parsers with Data-Oriented Design
Summary
The article argues that parser speed is driven by memory layout rather than grammar tricks. It demonstrates converting pointer-based ASTs to flat, index-based arrays, using struct-of-arrays layouts, and employing side tables for variadic children, plus a flat wire format for zero-copy cross-language handoffs. Practical patterns such as scratch buffers and lazy decoding are presented to minimize allocations and cache misses.