Adrian Sampson personal blog
Flattening ASTs and other compiler data structures
This is an introduction to data structure flattening, a special case of arena allocation that is a good fit for programming language implementations. We build a simple interpreter twice, the normal way and the flat way, and show that some fairly mechanical code changes can give you a 2.4× speedup.
- Points
- 285
- HN comments
- 130
- Submissions
- 2
- Cited by
- 4 commenters
Software EngineeringSystems & Performance2023
On Hacker News
| Submitted | Title on HN | Points | Comments |
|---|---|---|---|
| Jul 2, 2023 | Flattening ASTs and other compiler data structures by fagnerbrack | 285 | 81 |
| Jan 10, 2025 | Flattening ASTs and other compiler data structures (2023) by aw1621107 | 157 | 49 |
Cited in comments
Linked from 4 Hacker News comments by 4 different people, from Aug 2023 to Oct 2025.
Most recent: