// HACKER NEWS — CYBERSECURITY
Performance of WebAssembly Runtimes in 2026
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 test program is libsodium’s benchmark suite, built from libsodium commit 8e3be8615ba6adcd7babaecf5e76f516890ba5fb.
I built one native baseline and several WebAssembly variants:
For the native reference, libsodium was built with -Dcpu=native. For wasm2c, the generated C was compiled with zig cc -O3 -march=native.
For WAMR, I used AOT mode: wamrc compiled each .wasm file to an .aot file, and iwasm ran the resulting AOT file. wamrc doesn’t accept --cpu=native, so I used --target=x86_64 --cpu=x86-64-v4 --opt-level=3, which matches the host’s available x86-64 feature level and works across the WAMR versions that could compile these modules.
The WebAssembly commands were the same shape, with a wasm32-wasi target and the feature-specific CPU strings: