From c19cb0cbdfd29e2b76731b04e34b724ddee1f710 Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Tue, 28 May 2024 11:36:18 +0200 Subject: [PATCH] write Wasmi v0.32 article --- content/posts/wasmi-new-engine.md | 13 - .../linux-amd-epyc-7763/compile/argon2.svg | 136 ++++++ .../linux-amd-epyc-7763/compile/bz2.svg | 138 ++++++ .../compile/coremark-minimal.svg | 150 ++++++ .../linux-amd-epyc-7763/compile/erc20.svg | 150 ++++++ .../linux-amd-epyc-7763/compile/ffmpeg.svg | 128 +++++ .../compile/pulldown-cmark.svg | 150 ++++++ .../compile/spidermonkey.svg | 150 ++++++ .../benches/linux-amd-epyc-7763/coremark.json | 12 + .../linux-amd-epyc-7763/execute/argon2.svg | 98 ++++ .../linux-amd-epyc-7763/execute/bulk-ops.svg | 106 +++++ .../linux-amd-epyc-7763/execute/counter.svg | 114 +++++ .../execute/fib.iterative.svg | 114 +++++ .../execute/fib.recursive.svg | 114 +++++ .../execute/fib.tailrec.svg | 58 +++ .../linux-amd-epyc-7763/execute/matmul.svg | 114 +++++ .../linux-amd-epyc-7763/execute/primes.svg | 114 +++++ .../compile/argon2.svg | 136 ++++++ .../compile/bz2.svg | 138 ++++++ .../compile/coremark-minimal.svg | 150 ++++++ .../compile/erc20.svg | 150 ++++++ .../compile/ffmpeg.svg | 128 +++++ .../compile/pulldown-cmark.svg | 150 ++++++ .../compile/spidermonkey.svg | 138 ++++++ .../coremark.json | 12 + .../execute/argon2.svg | 98 ++++ .../execute/bulk-ops.svg | 106 +++++ .../execute/counter.svg | 120 +++++ .../execute/fib.iterative.svg | 114 +++++ .../execute/fib.recursive.svg | 114 +++++ .../execute/fib.tailrec.svg | 58 +++ .../execute/matmul.svg | 114 +++++ .../execute/primes.svg | 114 +++++ .../benches/macos-m2/compile/argon2.svg | 136 ++++++ .../benches/macos-m2/compile/bz2.svg | 130 ++++++ .../macos-m2/compile/coremark-minimal.svg | 142 ++++++ .../benches/macos-m2/compile/erc20.svg | 142 ++++++ .../benches/macos-m2/compile/ffmpeg.svg | 120 +++++ .../macos-m2/compile/pulldown-cmark.svg | 142 ++++++ .../benches/macos-m2/compile/spidermonkey.svg | 130 ++++++ .../benches/macos-m2/coremark.json | 12 + .../benches/macos-m2/execute/argon2.svg | 98 ++++ .../benches/macos-m2/execute/bulk-ops.svg | 106 +++++ .../benches/macos-m2/execute/counter.svg | 106 +++++ .../macos-m2/execute/fib.iterative.svg | 106 +++++ .../macos-m2/execute/fib.recursive.svg | 106 +++++ .../benches/macos-m2/execute/fib.tailrec.svg | 58 +++ .../benches/macos-m2/execute/matmul.svg | 106 +++++ .../benches/macos-m2/execute/primes.svg | 106 +++++ .../compile/argon2.svg | 130 ++++++ .../windows-intel-i7-14700k/compile/bz2.svg | 138 ++++++ .../compile/coremark-minimal.svg | 150 ++++++ .../windows-intel-i7-14700k/compile/erc20.svg | 150 ++++++ .../compile/ffmpeg.svg | 128 +++++ .../compile/pulldown-cmark.svg | 150 ++++++ .../compile/spidermonkey.svg | 150 ++++++ .../windows-intel-i7-14700k/coremark.json | 13 + .../execute/argon2.svg | 98 ++++ .../execute/bulk-ops.svg | 106 +++++ .../execute/counter.svg | 114 +++++ .../execute/fib.iterative.svg | 114 +++++ .../execute/fib.recursive.svg | 114 +++++ .../execute/fib.tailrec.svg | 58 +++ .../execute/matmul.svg | 114 +++++ .../execute/primes.svg | 114 +++++ content/posts/wasmi-v0.32/index.md | 436 ++++++++++++++++++ 66 files changed, 7709 insertions(+), 13 deletions(-) delete mode 100644 content/posts/wasmi-new-engine.md create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/argon2.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/bz2.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/coremark-minimal.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/erc20.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/ffmpeg.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/pulldown-cmark.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/spidermonkey.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/coremark.json create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/argon2.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/bulk-ops.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/counter.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/fib.iterative.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/fib.recursive.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/fib.tailrec.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/matmul.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/primes.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/argon2.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/bz2.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/coremark-minimal.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/erc20.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/ffmpeg.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/pulldown-cmark.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/spidermonkey.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/coremark.json create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/argon2.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/bulk-ops.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/counter.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/fib.iterative.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/fib.recursive.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/fib.tailrec.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/matmul.svg create mode 100644 content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/primes.svg create mode 100644 content/posts/wasmi-v0.32/benches/macos-m2/compile/argon2.svg create mode 100644 content/posts/wasmi-v0.32/benches/macos-m2/compile/bz2.svg create mode 100644 content/posts/wasmi-v0.32/benches/macos-m2/compile/coremark-minimal.svg create mode 100644 content/posts/wasmi-v0.32/benches/macos-m2/compile/erc20.svg create mode 100644 content/posts/wasmi-v0.32/benches/macos-m2/compile/ffmpeg.svg create mode 100644 content/posts/wasmi-v0.32/benches/macos-m2/compile/pulldown-cmark.svg create mode 100644 content/posts/wasmi-v0.32/benches/macos-m2/compile/spidermonkey.svg create mode 100644 content/posts/wasmi-v0.32/benches/macos-m2/coremark.json create mode 100644 content/posts/wasmi-v0.32/benches/macos-m2/execute/argon2.svg create mode 100644 content/posts/wasmi-v0.32/benches/macos-m2/execute/bulk-ops.svg create mode 100644 content/posts/wasmi-v0.32/benches/macos-m2/execute/counter.svg create mode 100644 content/posts/wasmi-v0.32/benches/macos-m2/execute/fib.iterative.svg create mode 100644 content/posts/wasmi-v0.32/benches/macos-m2/execute/fib.recursive.svg create mode 100644 content/posts/wasmi-v0.32/benches/macos-m2/execute/fib.tailrec.svg create mode 100644 content/posts/wasmi-v0.32/benches/macos-m2/execute/matmul.svg create mode 100644 content/posts/wasmi-v0.32/benches/macos-m2/execute/primes.svg create mode 100644 content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/argon2.svg create mode 100644 content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/bz2.svg create mode 100644 content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/coremark-minimal.svg create mode 100644 content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/erc20.svg create mode 100644 content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/ffmpeg.svg create mode 100644 content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/pulldown-cmark.svg create mode 100644 content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/spidermonkey.svg create mode 100644 content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/coremark.json create mode 100644 content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/argon2.svg create mode 100644 content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/bulk-ops.svg create mode 100644 content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/counter.svg create mode 100644 content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/fib.iterative.svg create mode 100644 content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/fib.recursive.svg create mode 100644 content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/fib.tailrec.svg create mode 100644 content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/matmul.svg create mode 100644 content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/primes.svg create mode 100644 content/posts/wasmi-v0.32/index.md diff --git a/content/posts/wasmi-new-engine.md b/content/posts/wasmi-new-engine.md deleted file mode 100644 index fb92054..0000000 --- a/content/posts/wasmi-new-engine.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -date: "2024-04-25T21:26:10+02:00" -title: Wasmi's new Execution Engine Arrived' -draft: true ---- - -Today we are proud to release Wasmi version 0.32 to the public. - -```rust -fn hello_world() { - println!("Hello, World!"); -} -``` diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/argon2.svg b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/argon2.svg new file mode 100644 index 0000000..c5071a2 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/argon2.svg @@ -0,0 +1,136 @@ + + + +compile/argon2 - AMD Epyc 7763 (Linux) + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +100.0 + + + +10000.0 + + + + + + + + + + + + + + + + +x308.96 + + +x2258.76 + + +x13861.34 + + +x34.78 + + +x1.00 + + +x103.22 + + +x46.25 + + +x1.14 + + +x1.91 + + +x25.82 + + +x56.29 + + +x67.46 + + +x45.02 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/bz2.svg b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/bz2.svg new file mode 100644 index 0000000..257bd17 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/bz2.svg @@ -0,0 +1,138 @@ + + + +compile/bz2 - AMD Epyc 7763 (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +100.0 + + + + + + + + + + + + + + + + + +x698.96 + + +x5022.90 + + +x577.51 + + +x7950.85 + + +x52.48 + + +x1.01 + + +x234.77 + + +x66.91 + + +x1.00 + + +x1.94 + + +x36.54 + + +x80.57 + + +x99.18 + + +x82.17 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/coremark-minimal.svg b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/coremark-minimal.svg new file mode 100644 index 0000000..7a16f3f --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/coremark-minimal.svg @@ -0,0 +1,150 @@ + + + +compile/coremark-minimal - AMD Epyc 7763 (Linux) + + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + +1000.0 + + + + + + + + + + + + + + + + + +x259.95 + + +x1324.40 + + +x472.53 + + +x2930.25 + + +x24.02 + + +x1.00 + + +x57.12 + + +x33.72 + + +x1.52 + + +x2.68 + + +x18.66 + + +x36.63 + + +x46.07 + + +x31.49 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/erc20.svg b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/erc20.svg new file mode 100644 index 0000000..3d895ec --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/erc20.svg @@ -0,0 +1,150 @@ + + + +compile/erc20 - AMD Epyc 7763 (Linux) + + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + +1000.0 + + + + + + + + + + + + + + + + + +x201.92 + + +x799.00 + + +x364.63 + + +x1863.17 + + +x12.38 + + +x1.00 + + +x33.88 + + +x20.66 + + +x1.44 + + +x2.96 + + +x11.92 + + +x19.94 + + +x27.23 + + +x19.82 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/ffmpeg.svg b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/ffmpeg.svg new file mode 100644 index 0000000..716f782 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/ffmpeg.svg @@ -0,0 +1,128 @@ + + + +compile/ffmpeg - AMD Epyc 7763 (Linux) + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + + + + + + + + + + + + + +x146.88 + + +x912.07 + + +x338.44 + + +x1.00 + + +x57.32 + + +x24.93 + + +x1.08 + + +x1.54 + + +x14.05 + + +x30.73 + + +x37.10 + + +x23.92 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/pulldown-cmark.svg b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/pulldown-cmark.svg new file mode 100644 index 0000000..46eb606 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/pulldown-cmark.svg @@ -0,0 +1,150 @@ + + + +compile/pulldown-cmark - AMD Epyc 7763 (Linux) + + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + +1000.0 + + + + + + + + + + + + + + + + + +x308.35 + + +x1815.57 + + +x570.66 + + +x4438.21 + + +x32.20 + + +x2.02 + + +x120.04 + + +x42.29 + + +x1.00 + + +x1.64 + + +x24.06 + + +x52.36 + + +x64.22 + + +x42.74 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/spidermonkey.svg b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/spidermonkey.svg new file mode 100644 index 0000000..057dc45 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/compile/spidermonkey.svg @@ -0,0 +1,150 @@ + + + +compile/spidermonkey - AMD Epyc 7763 (Linux) + + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + +1000.0 + + + + + + + + + + + + + + + + + +x231.04 + + +x1281.12 + + +x522.01 + + +x3890.63 + + +x29.33 + + +x1.00 + + +x93.49 + + +x38.75 + + +x1.25 + + +x1.85 + + +x22.44 + + +x48.00 + + +x57.73 + + +x35.30 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/coremark.json b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/coremark.json new file mode 100644 index 0000000..8b48b46 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/coremark.json @@ -0,0 +1,12 @@ +{ + "stitch": 1389.8541259765625, + "tinywasm": 235.10971069335938, + "wasm3.eager": 1292.4906005859375, + "wasm3.lazy": 1308.5579833984375, + "wasmer.cranelift": 17656.40625, + "wasmer.singlepass": 9586.892578125, + "wasmi-new.eager.checked": 1456.7703857421875, + "wasmi-new.lazy.checked": 1446.9686279296875, + "wasmi-old": 656.9125366210938, + "wasmtime.cranelift": 20038.7421875 +} \ No newline at end of file diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/argon2.svg b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/argon2.svg new file mode 100644 index 0000000..92c7232 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/argon2.svg @@ -0,0 +1,98 @@ + + + +execute/argon2 - AMD Epyc 7763 (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + +x2.61 + + +x1.14 + + +x1.00 + + +x23.67 + + +x23.85 + + +x89.64 + + +x22.03 + + +x21.58 + + +x41.18 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/bulk-ops.svg b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/bulk-ops.svg new file mode 100644 index 0000000..2c9d2b6 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/bulk-ops.svg @@ -0,0 +1,106 @@ + + + +execute/bulk-ops - AMD Epyc 7763 (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + +x1.00 + + +x1.00 + + +x1.14 + + +x1.14 + + +x1.13 + + +x1.11 + + +x1.51 + + +x1.17 + + +x1.17 + + +x1.23 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/counter.svg b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/counter.svg new file mode 100644 index 0000000..0ef7ddf --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/counter.svg @@ -0,0 +1,114 @@ + + + +execute/counter - AMD Epyc 7763 (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + + +x1.99 + + +x2.00 + + +x1.99 + + +x1.00 + + +x10.03 + + +x10.97 + + +x10.99 + + +x88.65 + + +x12.65 + + +x12.64 + + +x43.84 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/fib.iterative.svg b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/fib.iterative.svg new file mode 100644 index 0000000..ed80dd2 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/fib.iterative.svg @@ -0,0 +1,114 @@ + + + +execute/fib.iterative - AMD Epyc 7763 (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + + +x1.42 + + +x1.00 + + +x1.83 + + +x1.33 + + +x7.95 + + +x16.36 + + +x15.39 + + +x87.24 + + +x9.33 + + +x9.33 + + +x33.40 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/fib.recursive.svg b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/fib.recursive.svg new file mode 100644 index 0000000..aa642d6 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/fib.recursive.svg @@ -0,0 +1,114 @@ + + + +execute/fib.recursive - AMD Epyc 7763 (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + + +x1.17 + + +x1.00 + + +x1.05 + + +x1.00 + + +x4.65 + + +x6.28 + + +x6.75 + + +x26.16 + + +x8.43 + + +x8.42 + + +x8.14 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/fib.tailrec.svg b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/fib.tailrec.svg new file mode 100644 index 0000000..7ecb223 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/fib.tailrec.svg @@ -0,0 +1,58 @@ + + + +execute/fib.tailrec - AMD Epyc 7763 (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmtime (Cranelift) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + +x1.00 + + +x10.43 + + +x10.44 + + +x15.17 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/matmul.svg b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/matmul.svg new file mode 100644 index 0000000..d463f45 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/matmul.svg @@ -0,0 +1,114 @@ + + + +execute/matmul - AMD Epyc 7763 (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + + +x2.05 + + +x1.03 + + +x1.22 + + +x1.00 + + +x13.05 + + +x8.33 + + +x6.67 + + +x35.82 + + +x7.94 + + +x8.24 + + +x19.38 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/primes.svg b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/primes.svg new file mode 100644 index 0000000..22d17ed --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-epyc-7763/execute/primes.svg @@ -0,0 +1,114 @@ + + + +execute/primes - AMD Epyc 7763 (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + + +x1.52 + + +x1.27 + + +x1.41 + + +x1.00 + + +x9.56 + + +x9.30 + + +x8.68 + + +x45.15 + + +x7.93 + + +x7.95 + + +x19.66 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/argon2.svg b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/argon2.svg new file mode 100644 index 0000000..9f326b0 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/argon2.svg @@ -0,0 +1,136 @@ + + + +compile/argon2 - AMD Threadripper 3990x (Linux) + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +100.0 + + + +10000.0 + + + + + + + + + + + + + + + + +x449.28 + + +x2872.49 + + +x14374.79 + + +x36.37 + + +x1.00 + + +x115.95 + + +x48.73 + + +x1.28 + + +x2.00 + + +x27.05 + + +x62.41 + + +x78.36 + + +x51.21 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/bz2.svg b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/bz2.svg new file mode 100644 index 0000000..326540e --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/bz2.svg @@ -0,0 +1,138 @@ + + + +compile/bz2 - AMD Threadripper 3990x (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +100.0 + + + + + + + + + + + + + + + + + +x1186.89 + + +x5444.64 + + +x637.85 + + +x9135.51 + + +x56.48 + + +x1.00 + + +x259.95 + + +x77.54 + + +x1.19 + + +x2.28 + + +x41.41 + + +x94.14 + + +x117.82 + + +x81.15 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/coremark-minimal.svg b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/coremark-minimal.svg new file mode 100644 index 0000000..13154cf --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/coremark-minimal.svg @@ -0,0 +1,150 @@ + + + +compile/coremark-minimal - AMD Threadripper 3990x (Linux) + + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + +1000.0 + + + + + + + + + + + + + + + + + +x345.86 + + +x1305.26 + + +x427.74 + + +x2675.47 + + +x22.36 + + +x1.00 + + +x60.75 + + +x32.97 + + +x1.56 + + +x2.64 + + +x18.14 + + +x37.70 + + +x48.07 + + +x33.16 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/erc20.svg b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/erc20.svg new file mode 100644 index 0000000..263ab2b --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/erc20.svg @@ -0,0 +1,150 @@ + + + +compile/erc20 - AMD Threadripper 3990x (Linux) + + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + +1000.0 + + + + + + + + + + + + + + + + + +x384.28 + + +x980.53 + + +x329.16 + + +x1644.48 + + +x12.35 + + +x1.00 + + +x36.18 + + +x20.61 + + +x1.61 + + +x3.02 + + +x11.53 + + +x20.43 + + +x27.78 + + +x20.86 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/ffmpeg.svg b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/ffmpeg.svg new file mode 100644 index 0000000..386364e --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/ffmpeg.svg @@ -0,0 +1,128 @@ + + + +compile/ffmpeg - AMD Threadripper 3990x (Linux) + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + + + + + + + + + + + + + +x58.36 + + +x131.18 + + +x387.56 + + +x1.00 + + +x69.02 + + +x28.86 + + +x1.42 + + +x1.95 + + +x16.34 + + +x36.65 + + +x45.16 + + +x34.90 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/pulldown-cmark.svg b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/pulldown-cmark.svg new file mode 100644 index 0000000..2ef9c97 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/pulldown-cmark.svg @@ -0,0 +1,150 @@ + + + +compile/pulldown-cmark - AMD Threadripper 3990x (Linux) + + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + +1000.0 + + + + + + + + + + + + + + + + + +x424.49 + + +x1944.10 + + +x497.29 + + +x4020.72 + + +x29.27 + + +x1.00 + + +x111.67 + + +x39.25 + + +x1.04 + + +x1.54 + + +x22.42 + + +x50.39 + + +x62.30 + + +x41.65 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/spidermonkey.svg b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/spidermonkey.svg new file mode 100644 index 0000000..58b370e --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/compile/spidermonkey.svg @@ -0,0 +1,138 @@ + + + +compile/spidermonkey - AMD Threadripper 3990x (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +100.0 + + + + + + + + + + + + + + + + + +x222.59 + + +x576.38 + + +x1081.68 + + +x7663.55 + + +x59.48 + + +x1.00 + + +x202.02 + + +x82.05 + + +x2.68 + + +x3.71 + + +x46.76 + + +x104.16 + + +x128.87 + + +x82.37 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/coremark.json b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/coremark.json new file mode 100644 index 0000000..e3c40b0 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/coremark.json @@ -0,0 +1,12 @@ +{ + "stitch": 2186.5888671875, + "tinywasm": 338.77252197265625, + "wasm3.eager": 1992.5611572265625, + "wasm3.lazy": 1999.33349609375, + "wasmer.cranelift": 20455.474609375, + "wasmer.singlepass": 10416.1240234375, + "wasmi-new.eager.checked": 1779.0428466796875, + "wasmi-new.lazy.checked": 1778.0938720703125, + "wasmi-old": 943.5580444335938, + "wasmtime.cranelift": 22088.05859375 +} \ No newline at end of file diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/argon2.svg b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/argon2.svg new file mode 100644 index 0000000..590a464 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/argon2.svg @@ -0,0 +1,98 @@ + + + +execute/argon2 - AMD Threadripper 3990x (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + +x2.21 + + +x1.08 + + +x1.00 + + +x15.78 + + +x15.69 + + +x74.06 + + +x15.92 + + +x15.93 + + +x30.12 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/bulk-ops.svg b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/bulk-ops.svg new file mode 100644 index 0000000..2e5acae --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/bulk-ops.svg @@ -0,0 +1,106 @@ + + + +execute/bulk-ops - AMD Threadripper 3990x (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + +x1.01 + + +x1.00 + + +x1.13 + + +x1.05 + + +x1.04 + + +x1.04 + + +x1.41 + + +x1.07 + + +x1.06 + + +x1.17 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/counter.svg b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/counter.svg new file mode 100644 index 0000000..a1f0418 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/counter.svg @@ -0,0 +1,120 @@ + + + +execute/counter - AMD Threadripper 3990x (Linux) + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + + + + + + + + + + + + +x2.21 + + +x2.01 + + +x2.05 + + +x1.00 + + +x11.31 + + +x14.09 + + +x14.18 + + +x101.69 + + +x16.45 + + +x16.59 + + +x56.25 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/fib.iterative.svg b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/fib.iterative.svg new file mode 100644 index 0000000..1478873 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/fib.iterative.svg @@ -0,0 +1,114 @@ + + + +execute/fib.iterative - AMD Threadripper 3990x (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + + +x1.58 + + +x1.00 + + +x1.67 + + +x1.24 + + +x11.17 + + +x9.98 + + +x10.40 + + +x86.61 + + +x10.10 + + +x10.08 + + +x31.66 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/fib.recursive.svg b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/fib.recursive.svg new file mode 100644 index 0000000..26025dd --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/fib.recursive.svg @@ -0,0 +1,114 @@ + + + +execute/fib.recursive - AMD Threadripper 3990x (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + + +x1.26 + + +x1.04 + + +x1.47 + + +x1.00 + + +x7.16 + + +x7.97 + + +x8.01 + + +x33.45 + + +x12.28 + + +x12.25 + + +x14.11 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/fib.tailrec.svg b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/fib.tailrec.svg new file mode 100644 index 0000000..3822b4f --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/fib.tailrec.svg @@ -0,0 +1,58 @@ + + + +execute/fib.tailrec - AMD Threadripper 3990x (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmtime (Cranelift) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + +x1.00 + + +x11.20 + + +x11.48 + + +x14.67 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/matmul.svg b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/matmul.svg new file mode 100644 index 0000000..780b445 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/matmul.svg @@ -0,0 +1,114 @@ + + + +execute/matmul - AMD Threadripper 3990x (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + + +x2.12 + + +x1.04 + + +x1.33 + + +x1.00 + + +x6.15 + + +x6.45 + + +x6.20 + + +x48.25 + + +x10.73 + + +x10.79 + + +x15.34 + + diff --git a/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/primes.svg b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/primes.svg new file mode 100644 index 0000000..a9775b7 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/linux-amd-threadripper-3990x/execute/primes.svg @@ -0,0 +1,114 @@ + + + +execute/primes - AMD Threadripper 3990x (Linux) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + + +x1.09 + + +x1.04 + + +x1.13 + + +x1.00 + + +x3.16 + + +x3.67 + + +x3.65 + + +x18.07 + + +x3.88 + + +x3.88 + + +x10.23 + + diff --git a/content/posts/wasmi-v0.32/benches/macos-m2/compile/argon2.svg b/content/posts/wasmi-v0.32/benches/macos-m2/compile/argon2.svg new file mode 100644 index 0000000..0991383 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/macos-m2/compile/argon2.svg @@ -0,0 +1,136 @@ + + + +compile/argon2 - Apple M2 Pro (MacOS) + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +100.0 + + + +10000.0 + + + + + + + + + + + + + + + + +x192.00 + + +x1072.18 + + +x10014.29 + + +x26.36 + + +x1.00 + + +x99.50 + + +x33.46 + + +x1.17 + + +x1.86 + + +x17.95 + + +x36.83 + + +x45.07 + + +x54.74 + + diff --git a/content/posts/wasmi-v0.32/benches/macos-m2/compile/bz2.svg b/content/posts/wasmi-v0.32/benches/macos-m2/compile/bz2.svg new file mode 100644 index 0000000..256a41f --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/macos-m2/compile/bz2.svg @@ -0,0 +1,130 @@ + + + +compile/bz2 - Apple M2 Pro (MacOS) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +100.0 + + + + + + + + + + + + + + + + +x366.59 + + +x3577.66 + + +x6898.01 + + +x40.01 + + +x1.00 + + +x191.66 + + +x49.75 + + +x1.06 + + +x2.01 + + +x29.43 + + +x55.00 + + +x67.68 + + +x48.04 + + diff --git a/content/posts/wasmi-v0.32/benches/macos-m2/compile/coremark-minimal.svg b/content/posts/wasmi-v0.32/benches/macos-m2/compile/coremark-minimal.svg new file mode 100644 index 0000000..c9e56f3 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/macos-m2/compile/coremark-minimal.svg @@ -0,0 +1,142 @@ + + + +compile/coremark-minimal - Apple M2 Pro (MacOS) + + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + +1000.0 + + + + + + + + + + + + + + + + +x161.32 + + +x669.92 + + +x2168.90 + + +x15.16 + + +x1.00 + + +x34.61 + + +x20.60 + + +x1.38 + + +x2.33 + + +x9.83 + + +x19.40 + + +x25.09 + + +x20.49 + + diff --git a/content/posts/wasmi-v0.32/benches/macos-m2/compile/erc20.svg b/content/posts/wasmi-v0.32/benches/macos-m2/compile/erc20.svg new file mode 100644 index 0000000..039b0cb --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/macos-m2/compile/erc20.svg @@ -0,0 +1,142 @@ + + + +compile/erc20 - Apple M2 Pro (MacOS) + + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + +1000.0 + + + + + + + + + + + + + + + + +x164.94 + + +x496.95 + + +x1439.37 + + +x9.29 + + +x1.00 + + +x23.86 + + +x14.01 + + +x1.63 + + +x2.99 + + +x7.56 + + +x12.12 + + +x16.78 + + +x14.85 + + diff --git a/content/posts/wasmi-v0.32/benches/macos-m2/compile/ffmpeg.svg b/content/posts/wasmi-v0.32/benches/macos-m2/compile/ffmpeg.svg new file mode 100644 index 0000000..4e1b1aa --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/macos-m2/compile/ffmpeg.svg @@ -0,0 +1,120 @@ + + + +compile/ffmpeg - Apple M2 Pro (MacOS) + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + + + + + + + + + + + + +x63.39 + + +x306.12 + + +x1.00 + + +x57.17 + + +x25.82 + + +x1.05 + + +x1.53 + + +x14.81 + + +x28.64 + + +x34.63 + + +x24.14 + + diff --git a/content/posts/wasmi-v0.32/benches/macos-m2/compile/pulldown-cmark.svg b/content/posts/wasmi-v0.32/benches/macos-m2/compile/pulldown-cmark.svg new file mode 100644 index 0000000..fee5ed1 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/macos-m2/compile/pulldown-cmark.svg @@ -0,0 +1,142 @@ + + + +compile/pulldown-cmark - Apple M2 Pro (MacOS) + + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + +1000.0 + + + + + + + + + + + + + + + + +x186.27 + + +x1218.22 + + +x3870.87 + + +x26.41 + + +x3.13 + + +x96.62 + + +x33.68 + + +x1.00 + + +x1.44 + + +x20.01 + + +x39.10 + + +x48.07 + + +x34.96 + + diff --git a/content/posts/wasmi-v0.32/benches/macos-m2/compile/spidermonkey.svg b/content/posts/wasmi-v0.32/benches/macos-m2/compile/spidermonkey.svg new file mode 100644 index 0000000..32232ce --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/macos-m2/compile/spidermonkey.svg @@ -0,0 +1,130 @@ + + + +compile/spidermonkey - Apple M2 Pro (MacOS) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +100.0 + + + + + + + + + + + + + + + + +x120.55 + + +x487.64 + + +x4863.57 + + +x33.56 + + +x1.00 + + +x104.16 + + +x42.62 + + +x1.80 + + +x2.30 + + +x25.57 + + +x49.08 + + +x59.42 + + +x41.38 + + diff --git a/content/posts/wasmi-v0.32/benches/macos-m2/coremark.json b/content/posts/wasmi-v0.32/benches/macos-m2/coremark.json new file mode 100644 index 0000000..eded963 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/macos-m2/coremark.json @@ -0,0 +1,12 @@ +{ + "stitch": 3056.234619140625, + "tinywasm": 591.8751831054688, + "wasm3.eager": 2931.047119140625, + "wasm3.lazy": 2929.9736328125, + "wasmer.cranelift": 11611.705078125, + "wasmer.singlepass": 12777.103515625, + "wasmi-new.eager.checked": 1573.5640869140625, + "wasmi-new.lazy.checked": 1577.535888671875, + "wasmi-old": 884.4576416015625, + "wasmtime.cranelift": 12433.171875 +} \ No newline at end of file diff --git a/content/posts/wasmi-v0.32/benches/macos-m2/execute/argon2.svg b/content/posts/wasmi-v0.32/benches/macos-m2/execute/argon2.svg new file mode 100644 index 0000000..651b0b0 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/macos-m2/execute/argon2.svg @@ -0,0 +1,98 @@ + + + +execute/argon2 - Apple M2 Pro (MacOS) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + +x2.31 + + +x1.15 + + +x1.00 + + +x13.72 + + +x13.75 + + +x66.46 + + +x24.13 + + +x24.43 + + +x60.23 + + diff --git a/content/posts/wasmi-v0.32/benches/macos-m2/execute/bulk-ops.svg b/content/posts/wasmi-v0.32/benches/macos-m2/execute/bulk-ops.svg new file mode 100644 index 0000000..39dfe66 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/macos-m2/execute/bulk-ops.svg @@ -0,0 +1,106 @@ + + + +execute/bulk-ops - Apple M2 Pro (MacOS) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + +x1.00 + + +x1.00 + + +x1.03 + + +x1.04 + + +x1.02 + + +x1.02 + + +x1.27 + + +x1.07 + + +x1.05 + + +x1.18 + + diff --git a/content/posts/wasmi-v0.32/benches/macos-m2/execute/counter.svg b/content/posts/wasmi-v0.32/benches/macos-m2/execute/counter.svg new file mode 100644 index 0000000..cb9bc92 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/macos-m2/execute/counter.svg @@ -0,0 +1,106 @@ + + + +execute/counter - Apple M2 Pro (MacOS) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + +x1.87 + + +x1.87 + + +x1.00 + + +x6.21 + + +x7.47 + + +x7.47 + + +x55.64 + + +x10.28 + + +x10.28 + + +x39.66 + + diff --git a/content/posts/wasmi-v0.32/benches/macos-m2/execute/fib.iterative.svg b/content/posts/wasmi-v0.32/benches/macos-m2/execute/fib.iterative.svg new file mode 100644 index 0000000..a0ed8d4 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/macos-m2/execute/fib.iterative.svg @@ -0,0 +1,106 @@ + + + +execute/fib.iterative - Apple M2 Pro (MacOS) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + +x1.64 + + +x1.00 + + +x1.00 + + +x7.55 + + +x8.54 + + +x8.52 + + +x52.41 + + +x12.51 + + +x12.56 + + +x31.80 + + diff --git a/content/posts/wasmi-v0.32/benches/macos-m2/execute/fib.recursive.svg b/content/posts/wasmi-v0.32/benches/macos-m2/execute/fib.recursive.svg new file mode 100644 index 0000000..d1f1c5b --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/macos-m2/execute/fib.recursive.svg @@ -0,0 +1,106 @@ + + + +execute/fib.recursive - Apple M2 Pro (MacOS) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + +x1.27 + + +x1.63 + + +x1.00 + + +x5.96 + + +x9.15 + + +x9.15 + + +x50.15 + + +x14.84 + + +x14.84 + + +x15.77 + + diff --git a/content/posts/wasmi-v0.32/benches/macos-m2/execute/fib.tailrec.svg b/content/posts/wasmi-v0.32/benches/macos-m2/execute/fib.tailrec.svg new file mode 100644 index 0000000..fda6a71 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/macos-m2/execute/fib.tailrec.svg @@ -0,0 +1,58 @@ + + + +execute/fib.tailrec - Apple M2 Pro (MacOS) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmtime (Cranelift) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + +x1.00 + + +x2.90 + + +x2.89 + + +x3.65 + + diff --git a/content/posts/wasmi-v0.32/benches/macos-m2/execute/matmul.svg b/content/posts/wasmi-v0.32/benches/macos-m2/execute/matmul.svg new file mode 100644 index 0000000..58c5b81 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/macos-m2/execute/matmul.svg @@ -0,0 +1,106 @@ + + + +execute/matmul - Apple M2 Pro (MacOS) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + +x8.57 + + +x1.00 + + +x1.00 + + +x3.62 + + +x3.45 + + +x3.45 + + +x20.00 + + +x8.17 + + +x8.47 + + +x15.00 + + diff --git a/content/posts/wasmi-v0.32/benches/macos-m2/execute/primes.svg b/content/posts/wasmi-v0.32/benches/macos-m2/execute/primes.svg new file mode 100644 index 0000000..f3217a1 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/macos-m2/execute/primes.svg @@ -0,0 +1,106 @@ + + + +execute/primes - Apple M2 Pro (MacOS) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + +x2.30 + + +x1.61 + + +x1.00 + + +x8.86 + + +x10.49 + + +x10.51 + + +x48.09 + + +x19.41 + + +x19.33 + + +x35.38 + + diff --git a/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/argon2.svg b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/argon2.svg new file mode 100644 index 0000000..94fdc89 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/argon2.svg @@ -0,0 +1,130 @@ + + + +compile/argon2 - Intel i7 14700K (Windows) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +100.0 + + + + + + + + + + + + + + + + +x196.49 + + +x1121.41 + + +x8009.20 + + +x17.68 + + +x2.78 + + +x109.98 + + +x29.86 + + +x1.00 + + +x1.75 + + +x13.20 + + +x30.32 + + +x36.17 + + +x36.19 + + diff --git a/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/bz2.svg b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/bz2.svg new file mode 100644 index 0000000..310b59e --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/bz2.svg @@ -0,0 +1,138 @@ + + + +compile/bz2 - Intel i7 14700K (Windows) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +100.0 + + + + + + + + + + + + + + + + + +x491.95 + + +x3676.69 + + +x507.77 + + +x6953.76 + + +x37.40 + + +x1.00 + + +x238.15 + + +x51.19 + + +x1.42 + + +x2.82 + + +x28.18 + + +x61.97 + + +x78.01 + + +x50.19 + + diff --git a/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/coremark-minimal.svg b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/coremark-minimal.svg new file mode 100644 index 0000000..70717dc --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/coremark-minimal.svg @@ -0,0 +1,150 @@ + + + +compile/coremark-minimal - Intel i7 14700K (Windows) + + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + +1000.0 + + + + + + + + + + + + + + + + + +x300.35 + + +x1051.89 + + +x568.24 + + +x3614.77 + + +x20.45 + + +x1.00 + + +x63.58 + + +x37.25 + + +x2.64 + + +x5.03 + + +x16.97 + + +x35.76 + + +x44.00 + + +x41.44 + + diff --git a/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/erc20.svg b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/erc20.svg new file mode 100644 index 0000000..901dd67 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/erc20.svg @@ -0,0 +1,150 @@ + + + +compile/erc20 - Intel i7 14700K (Windows) + + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + +1000.0 + + + + + + + + + + + + + + + + + +x172.96 + + +x522.29 + + +x285.83 + + +x1351.44 + + +x7.96 + + +x1.00 + + +x26.68 + + +x18.65 + + +x2.08 + + +x4.06 + + +x8.07 + + +x13.44 + + +x18.22 + + +x16.94 + + diff --git a/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/ffmpeg.svg b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/ffmpeg.svg new file mode 100644 index 0000000..1c2a395 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/ffmpeg.svg @@ -0,0 +1,128 @@ + + + +compile/ffmpeg - Intel i7 14700K (Windows) + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + + + + + + + + + + + + + +x56.16 + + +x166.40 + + +x241.68 + + +x1.00 + + +x37.07 + + +x16.33 + + +x1.04 + + +x1.32 + + +x8.36 + + +x19.14 + + +x22.27 + + +x16.50 + + diff --git a/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/pulldown-cmark.svg b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/pulldown-cmark.svg new file mode 100644 index 0000000..e3c264c --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/pulldown-cmark.svg @@ -0,0 +1,150 @@ + + + +compile/pulldown-cmark - Intel i7 14700K (Windows) + + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + +1000.0 + + + + + + + + + + + + + + + + + +x140.73 + + +x761.99 + + +x305.56 + + +x2240.85 + + +x14.64 + + +x4.15 + + +x59.65 + + +x20.88 + + +x1.00 + + +x1.36 + + +x11.16 + + +x25.98 + + +x30.40 + + +x21.95 + + diff --git a/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/spidermonkey.svg b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/spidermonkey.svg new file mode 100644 index 0000000..79b0d96 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/compile/spidermonkey.svg @@ -0,0 +1,150 @@ + + + +compile/spidermonkey - Intel i7 14700K (Windows) + + + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy, unchecked) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (lazy-translation) + + + +Wasmi v0.32 (eager, unchecked) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + +100.0 + + + +1000.0 + + + + + + + + + + + + + + + + + +x91.58 + + +x277.60 + + +x364.77 + + +x2667.40 + + +x17.47 + + +x1.00 + + +x58.88 + + +x25.61 + + +x1.24 + + +x1.56 + + +x13.30 + + +x30.25 + + +x36.01 + + +x26.60 + + diff --git a/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/coremark.json b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/coremark.json new file mode 100644 index 0000000..da8e17f --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/coremark.json @@ -0,0 +1,13 @@ +Scores Summary (JSON): +{ + "stitch": 4891.96923828125, + "tinywasm": 772.471923828125, + "wasm3.eager": 3827.751220703125, + "wasm3.lazy": 3831.662353515625, + "wasmer.cranelift": 32840.72265625, + "wasmer.singlepass": 15538.80859375, + "wasmi-new.eager.checked": 2940.095458984375, + "wasmi-new.lazy.checked": 2979.072021484375, + "wasmi-old": 1758.6025390625, + "wasmtime.cranelift": 33131.78125 +} \ No newline at end of file diff --git a/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/argon2.svg b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/argon2.svg new file mode 100644 index 0000000..744327c --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/argon2.svg @@ -0,0 +1,98 @@ + + + +execute/argon2 - Intel i7 14700K (Windows) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + +x2.24 + + +x1.19 + + +x1.00 + + +x13.06 + + +x13.14 + + +x56.88 + + +x15.22 + + +x15.39 + + +x23.48 + + diff --git a/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/bulk-ops.svg b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/bulk-ops.svg new file mode 100644 index 0000000..cf8741f --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/bulk-ops.svg @@ -0,0 +1,106 @@ + + + +execute/bulk-ops - Intel i7 14700K (Windows) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + +x1.00 + + +x1.00 + + +x1.23 + + +x1.08 + + +x1.07 + + +x1.09 + + +x1.52 + + +x1.08 + + +x1.08 + + +x1.18 + + diff --git a/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/counter.svg b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/counter.svg new file mode 100644 index 0000000..58b238e --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/counter.svg @@ -0,0 +1,114 @@ + + + +execute/counter - Intel i7 14700K (Windows) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + + +x2.90 + + +x2.75 + + +x2.54 + + +x1.00 + + +x11.25 + + +x21.66 + + +x21.51 + + +x94.74 + + +x17.26 + + +x17.25 + + +x47.94 + + diff --git a/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/fib.iterative.svg b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/fib.iterative.svg new file mode 100644 index 0000000..8050467 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/fib.iterative.svg @@ -0,0 +1,114 @@ + + + +execute/fib.iterative - Intel i7 14700K (Windows) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + + +x1.61 + + +x1.00 + + +x1.48 + + +x1.00 + + +x6.42 + + +x12.56 + + +x12.58 + + +x59.61 + + +x7.67 + + +x7.58 + + +x23.70 + + diff --git a/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/fib.recursive.svg b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/fib.recursive.svg new file mode 100644 index 0000000..f06802a --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/fib.recursive.svg @@ -0,0 +1,114 @@ + + + +execute/fib.recursive - Intel i7 14700K (Windows) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + + +x1.55 + + +x1.00 + + +x1.32 + + +x1.01 + + +x6.76 + + +x11.60 + + +x11.61 + + +x49.50 + + +x9.88 + + +x9.81 + + +x9.26 + + diff --git a/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/fib.tailrec.svg b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/fib.tailrec.svg new file mode 100644 index 0000000..9f1533f --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/fib.tailrec.svg @@ -0,0 +1,58 @@ + + + +execute/fib.tailrec - Intel i7 14700K (Windows) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmtime (Cranelift) + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + +x1.00 + + +x18.64 + + +x18.69 + + +x22.87 + + diff --git a/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/matmul.svg b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/matmul.svg new file mode 100644 index 0000000..9752925 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/matmul.svg @@ -0,0 +1,114 @@ + + + +execute/matmul - Intel i7 14700K (Windows) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + + +x2.79 + + +x1.04 + + +x1.16 + + +x1.00 + + +x8.20 + + +x8.23 + + +x8.25 + + +x31.88 + + +x9.40 + + +x9.24 + + +x13.53 + + diff --git a/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/primes.svg b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/primes.svg new file mode 100644 index 0000000..8ccb560 --- /dev/null +++ b/content/posts/wasmi-v0.32/benches/windows-intel-i7-14700k/execute/primes.svg @@ -0,0 +1,114 @@ + + + +execute/primes - Intel i7 14700K (Windows) + + + + + + + +Relative Time (lower is better, logarithmic scale) + + + + + +Wasmer (Singlepass) + + + +Wasmer (Cranelift) + + + +Wasmtime (Winch) + + + +Wasmtime (Cranelift) + + + +Stitch (lazy) + + + +Wasm3 (lazy) + + + +Wasm3 (eager) + + + +Tinywasm + + + +Wasmi v0.32 (lazy) + + + +Wasmi v0.32 (eager) + + + +Wasmi v0.31 + + + + +1.0 + + + +10.0 + + + + + + + + + + + + + + +x1.61 + + +x1.44 + + +x1.46 + + +x1.00 + + +x5.90 + + +x7.82 + + +x7.94 + + +x31.84 + + +x7.09 + + +x7.07 + + +x19.26 + + diff --git a/content/posts/wasmi-v0.32/index.md b/content/posts/wasmi-v0.32/index.md new file mode 100644 index 0000000..fedb142 --- /dev/null +++ b/content/posts/wasmi-v0.32/index.md @@ -0,0 +1,436 @@ +--- +date: "2024-05-28T09:00:00+01:00" +title: "Wasmi's New Execution Engine - Faster Than Ever" +draft: false +author: 'Robin Freyler' +authorURL: 'https://github.com/robbepop' +--- + +After many months of research, development and QA, Wasmi's most significant update ever is finally ready for production use. + +[Wasmi] is an efficient and versatile [WebAssembly] (Wasm) interpreter with a focus on embedded environments. It is an excellent choice for plugin systems, cloud hosts and as smart contract execution engine. + +[Wasmi]: https://github.com/wasmi-labs/wasmi +[WebAssembly]: https://webassembly.org/ + +Wasmi intentionally mirrors the Wasmtime API on a best-effort basis, making it an ideal drop-in replacement or prototyping runtime. + +> Install [Wasmi's CLI tool] via `cargo install wasmi_cli` or use it as library via the [`wasmi` crate]. + +[`wasmi` crate]: https://crates.io/crates/wasmi +[Wasmi's CLI tool]: https://crates.io/crates/wasmi_cli + +Wasmi v0.32 comes with a new execution engine that utilizes register-based bytecode enhancing its execution performance by a factor of up to 5. +Additionally, its startup performance has been improved by several orders of magnitudes thanks to lazy compilation and other new techniques. + +The [changelog for v0.32] is huge and the following sections will present the most significant changes. + +[changelog for v0.32]: https://github.com/wasmi-labs/wasmi/releases/tag/v0.32.0 + +# Startup Performance + +Wasmi is a *rewriting interpreter*, meaning that it rewrites the incoming WebAssembly bytecode into Wasmi's own internal bytecode that is geared towards efficient execution performance. + +This re-writing is what we call *compilation* or *translation* in an interpreter. This is not to be confused with compiling the Wasmi interpreter itself. + +### Why is translation speed important for Wasmi? + +Fast translation enables a fast startup time which is the time spent until the first instruction is executed. + +As an interpreter, Wasmi is naturally optimized for fast startup times, making it well-suited for translation-intensive workloads where the time required to translate a Wasm binary exceeds the time needed to execute it. +Conversely, compute-intensive workloads, where execution time surpasses translation time, are better handled by JIT-based Wasm runtimes such as [Wasmtime], [WAMR], or [Wasmer]. [^10] + +[Wasmtime]: https://github.com/bytecodealliance/wasmtime +[WAMR]: https://github.com/bytecodealliance/wasm-micro-runtime +[Wasmer]: https://github.com/wasmerio/wasmer +[Wasmi]: https://github.com/wasmi-labs/wasmi +[Wasm3]: https://github.com/wasm3/wasm3 +[Wizard]: https://github.com/titzer/wizard-engine + +### Lazy Translation + +Translation can be costly, especially with the new register-based bytecode. To address this, lazy translation has been implemented, translating only the parts of the Wasm binary necessary for execution. + +Wasmi supports 3 different modes of translation: + +- `Eager`: Code is eagerly validated and eagerly translated ahead of time. + - **Note:** This is the default mode for Wasmi v0.32. +- `Lazy`: Code is lazily translated and lazily validated. + - **Note:** One downside is that this allows for partially validated Wasm modules which are controversial within the wider Wasm community. [^5] [^13] +- `LazyTranslation`: Code is lazily translated but eagerly validated. + - **Note:** While slower than `Lazy` this fixes the problem with partially validated Wasm modules. + +#### Usage as Library + +```rust +let mut c = wasmi::Config::default(); +c.compilation_mode(wasmi::CompilationMode::Lazy); +``` + +#### Usage in Wasmi's CLI + +Wasmi CLI now supports the command-line option `--compilation-mode=` where `` is one of `eager`, `lazy`, or `lazy-translation`. + +### Unchecked Translation + +Wasmi validates the Wasm binary which accounts for roughly 20-40% of the total time spent during the startup phase. +However, some users might want to skip Wasm validation altogether since they know ahead of time that used Wasm binaries are pre-validated. This is now possible via the `unsafe fn Module::new_unchecked` API. + +### Non-streaming Translation + +Wasmi v0.31 and earlier always used streaming translation to process their Wasm input. However, in practice most users never even made use of this, so in v0.32 Wasmi uses non-streaming translation by default which gives it yet another nice performance win. + +> Users who actually want to use streaming translation simply can use the new `Module::new_streaming` API for their needs. + +### Linker Caching + +The Wasmi `Linker` is used to define the set of host functions that a Wasm binary can use to communicate with the host. Oftentimes, dozens of host functions are defined, which can quickly become costly. + +To address this, Wasmi now offers a `LinkerBuilder`, which allows to efficiently instantiate new `Linker`s after the initial setup. [^7] + +Benchmarks with 50 defined host functions have demonstrated a 120x speedup using this approach. + +## Benchmarks + +By combining all of the techniques above it is possible to speed up the startup time of Wasmi by several orders of magnitudes compared to the previous Wasmi v0.31. + +The newest versions of all Wasm runtimes have been used at the time of writing this article. [^9]. + +> Currently, Winch only supports `x86_64` platforms and therefore was only tested on those systems. + +### ERC-20 - 7KB + +| | | +|-|-| +| [![][compile-erc20-epyc]][compile-erc20-epyc] | [![][compile-erc20-tr]][compile-erc20-tr] | +| [![][compile-erc20-m2]][compile-erc20-m2] | [![][compile-erc20-i7]][compile-erc20-i7] | + +[compile-erc20-epyc]: ./benches/linux-amd-epyc-7763/compile/erc20.svg +[compile-erc20-tr]: ./benches/linux-amd-threadripper-3990x/compile/erc20.svg +[compile-erc20-m2]: ./benches/macos-m2/compile/erc20.svg +[compile-erc20-i7]: ./benches/windows-intel-i7-14700k/compile/erc20.svg + +### Argon2 - 61KB + +| | | +|-|-| +| [![][compile-argon2-epyc]][compile-argon2-epyc] | [![][compile-argon2-tr]][compile-argon2-tr] | +| [![][compile-argon2-m2]][compile-argon2-m2] | [![][compile-argon2-i7]][compile-argon2-i7] | + +[compile-argon2-epyc]: ./benches/linux-amd-epyc-7763/compile/argon2.svg +[compile-argon2-tr]: ./benches/linux-amd-threadripper-3990x/compile/argon2.svg +[compile-argon2-m2]: ./benches/macos-m2/compile/argon2.svg +[compile-argon2-i7]: ./benches/windows-intel-i7-14700k/compile/argon2.svg + +### BZ - 147KB + +| | | +|-|-| +| [![][compile-bz2-epyc]][compile-bz2-epyc] | [![][compile-bz2-tr]][compile-bz2-tr] | +| [![][compile-bz2-m2]][compile-bz2-m2] | [![][compile-bz2-i7]][compile-bz2-i7] | + +[compile-bz2-epyc]: ./benches/linux-amd-epyc-7763/compile/bz2.svg +[compile-bz2-tr]: ./benches/linux-amd-threadripper-3990x/compile/bz2.svg +[compile-bz2-m2]: ./benches/macos-m2/compile/bz2.svg +[compile-bz2-i7]: ./benches/windows-intel-i7-14700k/compile/bz2.svg + +### Pulldown-Cmark - 1.6MB + +| | | +|-|-| +| [![][compile-pulldown-epyc]][compile-pulldown-epyc] | [![][compile-pulldown-tr]][compile-pulldown-tr] | +| [![][compile-pulldown-m2]][compile-pulldown-m2] | [![][compile-pulldown-i7]][compile-pulldown-i7] | + +[compile-pulldown-epyc]: ./benches/linux-amd-epyc-7763/compile/pulldown-cmark.svg +[compile-pulldown-tr]: ./benches/linux-amd-threadripper-3990x/compile/pulldown-cmark.svg +[compile-pulldown-m2]: ./benches/macos-m2/compile/pulldown-cmark.svg +[compile-pulldown-i7]: ./benches/windows-intel-i7-14700k/compile/pulldown-cmark.svg + +### Spidermonkey - 4.2MB + +| | | +|-|-| +| [![][compile-spidermonkey-epyc]][compile-spidermonkey-epyc] | [![][compile-spidermonkey-tr]][compile-spidermonkey-tr] | +| [![][compile-spidermonkey-m2]][compile-spidermonkey-m2] | [![][compile-spidermonkey-i7]][compile-spidermonkey-i7] | + +[compile-spidermonkey-epyc]: ./benches/linux-amd-epyc-7763/compile/spidermonkey.svg +[compile-spidermonkey-tr]: ./benches/linux-amd-threadripper-3990x/compile/spidermonkey.svg +[compile-spidermonkey-m2]: ./benches/macos-m2/compile/spidermonkey.svg +[compile-spidermonkey-i7]: ./benches/windows-intel-i7-14700k/compile/spidermonkey.svg + +### FFMPEG - 19.3MB + +> **Note:** Wasmtime (Cranelift) timed out and +> Stitch failed to compile `ffmpeg.wasm`. + +| | | +|-|-| +| [![][compile-ffmpeg-epyc]][compile-ffmpeg-epyc] | [![][compile-ffmpeg-tr]][compile-ffmpeg-tr] | +| [![][compile-ffmpeg-m2]][compile-ffmpeg-m2] | [![][compile-ffmpeg-i7]][compile-ffmpeg-i7] | + +[compile-ffmpeg-epyc]: ./benches/linux-amd-epyc-7763/compile/ffmpeg.svg +[compile-ffmpeg-tr]: ./benches/linux-amd-threadripper-3990x/compile/ffmpeg.svg +[compile-ffmpeg-m2]: ./benches/macos-m2/compile/ffmpeg.svg +[compile-ffmpeg-i7]: ./benches/windows-intel-i7-14700k/compile/ffmpeg.svg + +### Translation Benchmarks: Conclusion + +Wasmi and Wasm3 perform best by far due to their lazy compilation capabilities. As expected, optimizing JIT-based Wasm runtimes like Wasmtime and Wasmer perform worse in this context. Single-pass JITs, which are designed for fast startup, such as [Winch] and [Wasmer Singlepass], are also significantly slower. Despite also using lazy translation, [Stitch]'s translation performance is not ideal. However, it is important to note that both Winch and Stitch are still in an experimental phase of their development and improvements are to be expected. + +[Stitch]: https://github.com/makepad/stitch +[Winch]: https://crates.io/crates/wasmtime-winch +[Wasmer Singlepass]: https://crates.io/crates/wasmer-compiler-singlepass + +## Execution Speed + +For an execution engine, the speed of computation is naturally of paramount importance. Unfortunately, the old Wasmi v0.31 left much to be desired in this regard. + +## Register-Based Bytecode + +The old Wasmi v0.31 internally uses a stack-based intermediate representation (IR) to drive execution. This IR is similar to WebAssembly bytecode and thus allows for fast translation times. + +Stack-based IRs generally use more instructions to represent the same problem as register-based IRs. [^4] However, the performance of interpreters is mostly dictated by the dispatch of instructions. Hence, it is usually a good tradeoff to execute fewer instructions even if every executed instruction is more complex. [^6] + +This is why starting with version 0.32 Wasmi now uses a register-based IR to drive its execution. + +## Memory Consumption + +The new register-based IR was carefully designed to enhance execution performance and to minimize memory usage. As the vast majority of a Wasm binary is comprised of encoded instructions, this substantially decreases memory usage and enhances cache efficiency when executing Wasm through Wasmi. [^8] + +## Benchmarks + +The newest versions of all Wasm runtimes have been used at the time of writing this article. [^9]. + +### Fibonacci (Iterative) - Compute Intense + +| | | +|-|-| +| [![][execute-fib.iter-epyc]][execute-fib.iter-epyc] | [![][execute-fib.iter-tr]][execute-fib.iter-tr] | +| [![][execute-fib.iter-m2]][execute-fib.iter-m2] | [![][execute-fib.iter-i7]][execute-fib.iter-i7] | + +[execute-fib.iter-epyc]: ./benches/linux-amd-epyc-7763/execute/fib.iterative.svg +[execute-fib.iter-tr]: ./benches/linux-amd-threadripper-3990x/execute/fib.iterative.svg +[execute-fib.iter-m2]: ./benches/macos-m2/execute/fib.iterative.svg +[execute-fib.iter-i7]: ./benches/windows-intel-i7-14700k/execute/fib.iterative.svg + +### Fibonacci (Recursive) - Call Intense + +| | | +|-|-| +| [![][execute-fib.rec-epyc]][execute-fib.rec-epyc] | [![][execute-fib.rec-tr]][execute-fib.rec-tr] | +| [![][execute-fib.rec-m2]][execute-fib.rec-m2] | [![][execute-fib.rec-i7]][execute-fib.rec-i7] | + +[execute-fib.rec-epyc]: ./benches/linux-amd-epyc-7763/execute/fib.recursive.svg +[execute-fib.rec-tr]: ./benches/linux-amd-threadripper-3990x/execute/fib.recursive.svg +[execute-fib.rec-m2]: ./benches/macos-m2/execute/fib.recursive.svg +[execute-fib.rec-i7]: ./benches/windows-intel-i7-14700k/execute/fib.recursive.svg + +Wasmi v0.32 has not significantly improved over v0.31 in this test case. This is partly because Wasmi v0.31 was already comparatively fast and that the new register-based bytecode favors compute-intense workloads over call-intense ones. This usually is a good tradeoff since most Wasm producers (such as LLVM) produce compute intense workloads due to aggressive inlining. + +### Primes - Balanced + +| | | +|-|-| +| [![][execute-primes-epyc]][execute-primes-epyc] | [![][execute-primes-tr]][execute-primes-tr] | +| [![][execute-primes-m2]][execute-primes-m2] | [![][execute-primes-i7]][execute-primes-i7] | + +[execute-primes-epyc]: ./benches/linux-amd-epyc-7763/execute/primes.svg +[execute-primes-tr]: ./benches/linux-amd-threadripper-3990x/execute/primes.svg +[execute-primes-m2]: ./benches/macos-m2/execute/primes.svg +[execute-primes-i7]: ./benches/windows-intel-i7-14700k/execute/primes.svg + +### Matrix Multiplication - Memory Intense + +| | | +|-|-| +| [![][execute-matmul-epyc]][execute-matmul-epyc] | [![][execute-matmul-tr]][execute-matmul-tr] | +| [![][execute-matmul-m2]][execute-matmul-m2] | [![][execute-matmul-i7]][execute-matmul-i7] | + +[execute-matmul-epyc]: ./benches/linux-amd-epyc-7763/execute/matmul.svg +[execute-matmul-tr]: ./benches/linux-amd-threadripper-3990x/execute/matmul.svg +[execute-matmul-m2]: ./benches/macos-m2/execute/matmul.svg +[execute-matmul-i7]: ./benches/windows-intel-i7-14700k/execute/matmul.svg + +Interestingly, Wasmer (Singlepass) seems to have some trouble on Apple silicon being even slower than some of the interpreters. + +### Argon - Compute Hash + +> **Note:** Stitch and Winch could not execute the `argon2.wasm` test case. + +| | | +|-|-| +| [![][execute-argon2-epyc]][execute-argon2-epyc] | [![][execute-argon2-tr]][execute-argon2-tr] | +| [![][execute-argon2-m2]][execute-argon2-m2] | [![][execute-argon2-i7]][execute-argon2-i7] | + +[execute-argon2-epyc]: ./benches/linux-amd-epyc-7763/execute/argon2.svg +[execute-argon2-tr]: ./benches/linux-amd-threadripper-3990x/execute/argon2.svg +[execute-argon2-m2]: ./benches/macos-m2/execute/argon2.svg +[execute-argon2-i7]: ./benches/windows-intel-i7-14700k/execute/argon2.svg + +### Coremark + +The following table shows Coremark scores for the Wasm interpreters by CPU. [^12] + +| | AMD Epyc 7763 | AMD Threadripper 3990x | Apple M2 Pro | Intel i7 14700K | +|-:|-:|-:|-:|-:| +| Wasmi v0.31 | 657 | 944 | 884 | 1759 | +| Wasmi v0.32 | **1457** | 1779 | 1577 | 2979 | +| Tinywasm | 235 | 339 | 592 | 772 | +| Wasm3 | 1309 | 1999 | 2931 | 3831 | +| Stitch | 1390 | **2187** | **3056** | **4892** | + +### Execution Benchmarks: Conclusion + +Wasmi is especially strong on AMD server chips and lacks behind on Apple silicon. An explanation for this could be the difference in the technique for instruction dispatch being used. [^1] + +The Stitch interpreter performs really well. The reason likely is that Stitch encourages the LLVM optimizer to produce tail calls for its instruction dispatch, despite Rust not supporting them. Due to various downsides this design decision was discussed and dismissed during the development of Wasmi v0.32. [^2] [^3] Given Stitch's impressive execution performance especially on Apple silicon and Windows platforms those decisions should be reevaluated again. + +Confusingly the great results for Wasmi on the test cases for the Intel i7 14700K are not reflected by its Coremark score. This probably is because every test case, including Coremark, is biased towards some kinds of workloads to some degree. + +## Benchmark Suite + +The benchmarks and plots above have been gathered and generated using the [`wasmi-benchmarks`] repository. +The reader is encouraged to run the benchmarks and plot the results on their own computer to confirm or disprove the claims. Usage instructions can be found in the [`wasmi-benchmarks`'s `README.md`]. + +[`wasmi-benchmarks`'s `README.md`]: https://github.com/wasmi-labs/wasmi-benchmarks?tab=readme-ov-file#plotting + +Contributions adding more Wasm runtimes, improving the plots or to add new test cases are welcome! + +[`wasmi-benchmarks`]: https://github.com/wasmi-labs/wasmi-benchmarks + +# Summary & Outlook + +This article displayed the highlights of the new Wasmi version 0.32 and demonstrated the significant improvements in both startup and execution performance through various test cases. + +With this new major update Wasmi now has a solid foundation for future development. +Many [WebAssembly proposals] such as the `multi-memory`, `simd` and `gc` proposals that have been put on hold for the development of Wasmi v0.32 are awaiting their implementation. + +[WebAssembly proposals]: https://github.com/WebAssembly/proposals + +The promising results especially on the AMD server chips are a decent indicator that +Wasmi has great potential. +The performance of Wasmi on Apple silicon will be improved in future releases. + +Plans are underway to implement the [Wasm C-API], enabling various ecosystems that can interface with C to use Wasmi as a library. + +[Wasm C-API]: https://github.com/WebAssembly/wasm-c-api + +Wasmi will continue to solidify its position as an efficient and versatile Wasm interpreter +with a fantastic startup performance and low memory consumption especially suited for embedded environments. + +# Special Thanks + +- First and foremost, I want to thank [Parity Technologies] for financing and supporting the development of Wasmi for such a long time and for allowing Wasmi to become an independent project. + +[Parity Technologies]: https://www.parity.io/ + +- I want to commend the members of the [Bytecode Alliance] for their outstanding efforts in shaping the WebAssembly specification and ecosystem. Their contributions, among others, include runtimes such as [Wasmtime] and [WAMR] as well as [advanced WebAssembly tooling]. + +[advanced WebAssembly tooling]: https://github.com/bytecodealliance/wasm-tools + +[Bytecode Alliance]: https://bytecodealliance.org/ + +- Additionally, I want to extend my gratitude to [OLUWAMUYIWA], who dedicated their time and effort to implement WASI preview1 support for Wasmi — which was absolutely amazing! + +[OLUWAMUYIWA]: https://github.com/OLUWAMUYIWA + +- Furthermore, I want to thank [yamt], who inspired me with their Wasm runtime benchmarking platform. I highly recommend checking out their [toywasm] Wasm interpreter! + +[yamt]: https://github.com/yamt +[toywasm]: https://github.com/yamt/toywasm + +- Finally, I would like to acknowledge [Neopallium] for the thought-provoking discussions and experiments we shared about efficient interpreter dispatching techniques in Rust. I highly recommend checking out one of his Wasm experiments, [s1vm]. + +[Neopallium]: https://github.com/Neopallium +[s1vm]: https://github.com/Neopallium/s1vm + +[^1]: An explanation for Wasmi's inferior performance on Apple silicon is the loop-switch dispatch that is a black box concerning the generated machine code and heavily depends on heuristics in the optimizer. Recently, Apple announced enhancements in their branch prediction for their latest M4 chips which could significantly affect Wasmi's performance since efficient interpreters heavily rely on well-tuned processor branch prediction. [^11] + +[^11]: [The Structure and Performance of Efficient Interpreters](https://jilp.org/vol5/v5paper12.pdf) by Ertl. et. al. + +[^2]: The preferred solution is to finally implement [explicit tail calls for Rust]. This has been an ongoing topic of discussion for years and was proposed multiple times. It is more than evident that explicit tail calls, while niche, allow for specific performance critical program designs. + +[explicit tail calls for Rust]: https://github.com/rust-lang/rfcs/pull/3407 + +[^3]: The downsides of Stitch's approach are well documented in its own README. The main issue is its reliance on LLVM's optimizer to produce the correct code on all platforms which is likely but not guaranteed. If LLVM does not produce the correct code, Wasmi will be slow but Stitch will not even work. + +[^4]: + A simple example for this is the translation of the following Wasm bytecode: + + ```wasm + local.get 0 + local.get 1 + i32.add + local.set 0 + ``` + + Which adds locals at index 0 and 1 and stores the result back into the local at index 0. + Wasmi v0.32 translates this bytecode to a single Wasmi IR instruction: + + ```wasm + 0 <- i32.add 0 1 + ``` + + Thus reducing the amount of instructions needed to be executed from 4 down to 1. + +[^5]: For more information see [this GitHub issue](https://github.com/WebAssembly/design/issues/1464). + +[^6]: The new translation from stack-based to register-based bytecode is a complex and interesting topic that might warrant its own article if there is enough interest in it. + +[^7]: + An example code snippet for how to use the new `LinkerBuilder` is the following: + ```rust + fn test() { + let mut builder = >::build(); + // Populate the linker with the desired host functionality: + builder + .func_wrap("env", "foo", |_caller: Caller<()>| println!("called foo)) + .unwrap(); + builder + .func_wrap("env", "bar", |_caller: Caller<()>| println!("called bar)) + .unwrap(); + let builder = builder.finish(); + } + ``` + Now `builder` can be used to quickly spawn new `Linker`'s with the predefined + set of host functions. + ```rust + let engine = Engine::default(); + let linker = builder.create(&engine); // FAST! + ``` + +[^8]: + A benchmark for startup and memory consumption, albeit somewhat outdated, can be found in the [toywasm benchmarks]. Significant improvements have been made to Wasmi since those benchmarks were conducted, so one should to take those numbers with a grain of salt. + + [toywasm benchmarks]: https://github.com/yamt/toywasm/blob/master/benchmark/startup.md + +[^9]: + The following versions have been used for the tested Wasm runtimes: + + | Runtime | Version | + |:-|:-| + | Wasmi v0.31 | v0.31.2 | + | Wasmi v0.32 | v0.32.0-beta.18 | + | Tinywasm | v0.7.0 | + | Wasm3 | v0.5.0 | + | Stitch | v0.1.0 | + | Wasmtime / Winch | v20.0 | + | Wasmer | v4.3 | + +[^10]: + There are basically two kinds of Wasm workloads: + + 1. **Compute-Intense:** The time to execute the Wasm binary exceeds the time to translate it. + - This use case is best covered by a JIT based Wasm runtime such as [Wasmtime], [WAMR] or [Wasmer]. + 2. **Translation-Intense:** The time to translate the Wasm binary exceeds the time to execute it. + - This use case is best covered by a Wasm runtime that optimizes for fast startup times such as [Wasmi], [Wasm3] or [Wizard]. + + If it is unclear whether a workload is translation-intensive or compute-intensive, it may be beneficial to use a Wasm runtime that balances both types of workloads. Examples include [Wasmtime's Winch] or [Wasmer's Singlepass] JIT, which are designed to handle a mix of translation and execution demands effectively. + + [Wasmtime's Winch]: https://crates.io/crates/wasmtime-winch + [Wasmer's Singlepass]: https://crates.io/crates/wasmer-compiler-singlepass + +[^12]: + For Wasmi and Wasm3 both `lazy` and `eager` modes resulted in nearly the same scores. This is because Coremark is a long-running task where the impact of lazy translation is greatly reduced. The table displays the higher score among the different modes. + +[^13]: Another downside is that some Wasm runtime limitations, for example the maximum number of bytes per Wasm function, may not be checked when using lazy function translation.