Plush interpreter gets 17% speed boost by replacing Value enum with NaN-boxed 64-bit word
The developer behind the Plush programming language rewrote its core Value type, switching from a Rust tagged enum to a packed 64-bit representation (similar to NaN-boxing). This change, part of an ongoing series optimizing the Plush interpreter and garbage collector, produced a measured 17% speedup in interpreter performance.
GoKawiil's interpretation of the reporting above, not reported fact.
Tagged enums are easy to write in Rust but often bloat memory and hurt cache performance because each Value takes up extra space for its tag and largest variant. Packing type and payload into a single machine word is a classic technique used in production VMs like V8 and LuaJIT, and this project shows the tangible payoff even in a hobbyist interpreter aiming for real-time 3D rendering performance.
- Plush's interpreter now uses a 64-bit packed Value type instead of a Rust enum.
- The change alone improved interpreter speed by 17%.
- The optimization follows earlier garbage collector improvements as part of a push toward real-time performance.
Source: pointersgonewild.com, 2026-09-05
Published there as: “Replacing a Rust Enum with a 64-Bit Word Made My Interpreter 17% Faster”
Read the original report → The summary and analysis above are GoKawiil's own, written from reporting by the source above. Facts and quotes belong to the original publisher.