Technology
Wasmi 2.0 released with major interpreter performance overhaul
An architectural update introduces direct-threaded dispatch and hardware accumulator registers to boost execution speeds.
The short version
- Wasmi 2.0 has been released following eight months of development sponsored by the Stellar Development Foundation.
- The updated WebAssembly interpreter introduces four instruction dispatch modes, hardware accumulator registers, and binary size optimizations.
- Benchmark results reported by the project show execution speeds roughly 2.2 times faster than Wasmi 1.0 on an Apple M2 Pro, while maintaining comparable startup times.
Key facts
- Wasmi 2.0 was developed over eight months with financial sponsorship from the Stellar Development Foundation, which began supporting the project in October 2024.[Hacker News]
- According to project benchmarks on an Apple M2 Pro, Wasmi 2.0 achieved approximately 2.2 times faster execution performance compared to Wasmi 1.0 in geometric mean across the wasmi-benchmarks suite.[Hacker News]
- The release introduces four instruction dispatch mechanisms: Direct-Threaded Code, Indirect-Threaded Code, Switch-Loop, and Call-Loop.[Hacker News]
- Wasmi 2.0 adds three accumulator registers—ireg, freg32, and freg64—enabling intermediate operands and results to be stored directly in hardware registers instead of stack slots.[Hacker News]
- Additional features included in the release comprise stable fuel metering, support for WebAssembly's deterministic profile, an updated CLI tool, and crate configurations to reduce binary artifact sizes.[Hacker News]
What remains uncertain
- Full multi-platform benchmark comparisons across alternative WebAssembly runtimes have not yet been published, pending a promised follow-up article.[Hacker News]