wasmerio / wasmer

🚀 The leading Wasm Runtime supporting WASIX and WASI
https://wasmer.io
MIT License
19.04k stars 814 forks source link

Investigate optimizations for Cranelift #5195

Closed xdoardo closed 2 weeks ago

xdoardo commented 3 weeks ago

We recently ran benchmarks as part of the latest release. The coremark benchmark result with the cranelift backend is suspiciously different from LLVM's:

LLVM Cranelift Singlepass V8 WAMR WASMI
30088,535516 11635,638588 11565,440821 23022,911327 862,662012 873,574267

We should investigate if we are missing any optimization that can impact this result.

xdoardo commented 2 weeks ago

I'm closing as the evidence shows that the number above is correct. We compiled coremark from scratch and ran it with wasmer 3.3.0, 5.0.0 and the latest wasmtime. We confirm that in wasmer 3.3.0 coremark gives a result around ~30000, while latest wasmer and wasmtime score ~11500.

This, I believe, means that we're not missing any obvious optimization on our cranelift backend.