Replacing a Rust Enum with a 64-bit Word Made My Interpreter 17% Faster
Summary
The article documents a performance-focused refactor of Plush’s Value type from a Rust enum to a 64-bit tagged word. The author reports significant memory usage reductions and broad speedups across benchmarks, comparing the old match-based dispatch with a compact, register-resident implementation. It discusses design tradeoffs, including occasional heap boxing and implications for VM design.