Replacing a Rust Enum with a 64-bit Word Made This Interpreter 17% Faster
blaizedsouza · x · 2026-09-15
The author of the Plush language details the sixth installment of his interpreter optimization series: swapping a Rust tagged enum Value type for a tagged 64-bit word representation delivered a 17% performance win.
- Plush is a dynamically-typed language (in the family of Python/JS/Lua), so the interpreter needs a universal Value type; the original tagged enum with match-based dispatch was replaced with a packed 64-bit word to cut indirection overhead
- This follows a previous post where simple changes made the copying GC over 16x faster, bringing collection of a million objects down to 7 ms
- The author's goal is making an interpreted language fast enough for real-time 3D animation rendering
- The post is a solid introduction to key concepts for anyone building fast interpreters or JIT compilers
More from Research
- T02 system takes first place in VoiceMOS Challenge 2026 Track 2 — kastnerkyle · 2026-09-15
- Jon Barron decodes non-Gaussian 3D scene representation: spheres bound each texel — jon_barron · 2026-09-15
- ImageNet representational similarity is algorithmic, not mechanistic, argues neuroAI thread — ShahabBakht · 2026-09-15
- NeuroAI researcher: backprop conflates evolution, development and lifelong learning — ShahabBakht · 2026-09-15
- k-server Conjecture Proved, Closing a Classic Online Algorithms Open Problem — minilek · 2026-09-15
- Yale physicists re-grade AI benchmarks: most are broken, frontier models near saturation — inductionheads · 2026-09-15