I wanted to know if WebAssembly runtimes are getting faster.
This is a follow-up to the earlier libsodium WebAssembly benchmarks from 2019, 2021 and 2023.
Not “does the newest version beat native code in one microbenchmark?”, and not “which runtime has the prettiest benchmark chart?”, but something more boring and more useful:
If I take the same C crypto code, compile it to WebAssembly, and run it on the latest runtime, a runtime from one year ago, and a runtime from two years ago, are things actually improving?
So I benchmarked libsodium on WebAssembly runtimes released around June 2024, June 2025, and June 2026.
The short version:
wasmer is the best performer, but WAVM , WAMR and Wasmtime are close.
is the best performer, but , and are close. WAVM has the best optimizer, and is able to generate very fast code out from baseline, portable WebAssembly
has the best optimizer, and is able to generate very fast code out from baseline, portable WebAssembly The new WebAssembly wide_arithmetic instructions are a big deal for crypto code when runtimes support them.
What I measured
... continue reading