A 64-bit tagged word makes a Rust interpreter smaller and faster
Plush’s dynamic-language Value enum occupied 128 bits even though each payload needed at most 64. Replacing it with a low-bit-tagged u64 uses alignment bits for type information, keeps common integer operations as direct machine arithmetic, and leaves uncommon values to boxing. Across the author’s benchmarks, every workload got faster; memory fell by as much as 37% on an allocation-heavy neural-network benchmark.
The main win was not fewer bit operations but fewer spills and memory accesses: values now fit in one register, improving cache behavior and letting LLVM generate a much shorter interpreter fast path. The trade-off is a 62-bit fixnum range and occasional heap boxing for large integers or unusual floating-point values.