ELSEIF
Your brief EB
450 stories from 156 feeds 857 clusters Refreshed 9 minutes ago next pull 23:39

EDGE Signal 323 2 feeds carried it

Wasmi 2.0 ships direct-threaded Wasm dispatch mode, ~2.2x faster than 1.0

Illustration only Photo by Igor Omilaev on Unsplash

Wasmi 2.0, a portable WebAssembly interpreter, is released after eight months of work with a new direct-threaded code dispatch mode and a reported ~2.2x geometric-mean speedup over Wasmi 1.0 on the project's wasmi-benchmarks suite.

WHY IT MATTERS

For engineers embedding a Wasm runtime in IoT firmware, plugin systems, smart contracts or cloud hosts, the dispatch-mode switch is a behavioral change: the fastest path now relies on tail-call support, with portable fallbacks that trade speed. The 2.2x figure comes from the project's own benchmarks on Apple M2 Pro, AMD EPYC 7763 and Intel Xeon Platinum 8370C, and only one feed in the provided material carries this release, so there is no independent corroboration to lean on yet.

Written by elseif from the cluster below · every claim links back to a source

The three things worth knowing

01

Wasmi 2.0 ships four dispatch modes, direct-threaded, indirect-threaded, switch-loop, and call-loop, with an auto-dispatch feature that picks threaded code where the platform allows.

02

The project reports ~2.2x geometric-mean speedup over Wasmi 1.0 and benchmarks the new interpreter against Wasm3, WAMR fast-interpreter, Wasmtime Pulley and Makepad Stitch on three hardware setups.

03

Alongside the engine rewrite, the release adds stable fuel metering, WebAssembly deterministic profile support, an improved CLI and a validate crate feature aimed at reducing binary artifact size, with work sponsored by the Stellar Development Foundation since October 2024.

THE READ

What the cluster adds up to.

ORIGINAL ANALYSIS

The shape of the change is a rewrite of the dispatch model. Wasmi 1.0 ran instructions through a switch-loop, and Wasmi 2.0 now exposes direct-threaded code as the fastest path. The article characterizes direct-threaded code as embedding function pointers into the internal IR and chaining instruction handlers via tail calls; indirect-threaded code is the same idea with op-codes plus a jump table, sitting roughly 10 to 15% slower but using significantly less IR memory. Switch-loop is retained for platforms that do not support tail calls, and call-loop is described as existing only because portable-dispatch and indirect-dispatch are independent crate features, with the author explicitly saying it cannot be recommended.

The cost of adoption is choosing a dispatch mode through crate features (indirect-dispatch, portable-dispatch, auto-dispatch) and accepting that the fastest path is only available where the target toolchain supports tail calls. The article frames direct-threaded code as the same architecture used by both Wasm3 and Makepad Stitch, which places Wasmi 2.0 in the same family on those platforms rather than as a wholly new design. The maintainer also flags that switch-loop "leaves a lot of performance on the table, especially on Apple Silicon," so picking the portable default has a real per-platform cost rather than being a free fallback.

Where it stops working is anything that cannot rely on tail calls, which falls back to switch-loop and is described as the slowest supported path. Call-loop is explicitly called out as "very slow and not memory efficient." The article does not enumerate which targets or toolchains fail tail-call support, so an adopter still has to verify on the architecture they ship to. Startup performance is described as "mostly on par" with Wasmi 1.0 rather than improved, meaning the headline gain is in steady-state execution, not module loading.

The evidence base is narrow. The 2.2x figure is geometric mean across the wasmi-benchmarks suite on Apple M2 Pro, and the cross-runtime comparison was rerun on AMD EPYC 7763 and Intel Xeon Platinum 8370C. Only one feed in the inputs carries this release, so there is no independent benchmark corroboration in the provided material. The article also notes that the comparison plot needed logarithmic scaling on the startup axis because Wasmtime Pulley is an outlier, which is worth knowing before reading the startup chart as if it were linear.

Adjacent changes ride along with the engine rewrite. Stable fuel metering, the WebAssembly deterministic profile and an improved CLI were added on user request, and a validate crate feature is positioned as a knob for reducing binary artifact size, relevant to the IoT and embedded-console use cases the article names. The maintainer thanks Felix Kutzner for proofreading and credits the Stellar Development Foundation with sponsoring the project since October 2024, while listing Typst, Zellij, Josh, Soroban, Ripple and Firefly Zero as the kind of embedded consumers where the dispatch-mode trade-off actually shows up in production.

Written by elseif from the cluster below · checked for specifics the sources never contained

THE CLUSTER

Same story, 2 feeds.

ORDERED BY FIRST SEEN
wasmi-labs.github.io via Lobsters Wasmi 2.0 - Engineering of the Fastest Wasm Interpreters Open ↗
wasmi-labs.github.io via Hacker News Engineering of the fastest WebAssembly interpreters Open ↗