Skip to content

Commit dae557d

Browse files
committed
Update zwasm to v0.11.0 (x86_64 JIT, tail calls, multi-memory)
Bump zwasm dependency from v0.10.0 to v0.11.0. Record wasm benchmarks. Update docs with latest numbers.
1 parent f7d1474 commit dae557d

6 files changed

Lines changed: 63 additions & 20 deletions

File tree

.dev/memo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Session handover document. Read at session start.
66

77
- **All phases through 53 COMPLETE**
88
- Coverage: 835+ vars (635/706 core, 16 namespaces total)
9-
- Wasm engine: zwasm v0.8.0 (GitHub URL dependency, build.zig.zon)
9+
- Wasm engine: zwasm v0.11.0 (GitHub URL dependency, build.zig.zon)
1010
- Bridge: `src/wasm/types.zig` (751 lines, thin wrapper over zwasm)
1111
- 49 upstream test files, all passing. 6/6 e2e tests pass.
12-
- Benchmarks: `bench/history.yaml` (zwasm-v0.8.0 entry = latest baseline)
12+
- Benchmarks: `bench/history.yaml` (zwasm-v0.11.0 entry = latest baseline)
1313

1414
## Strategic Direction
1515

.dev/roadmap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Goal: Babashka-competitive startup, single binary distribution, behavioral compa
1919
- **71 skip vars** remaining (70+ permanently JVM, ~1 implementable)
2020
- **49 upstream test files**, all passing (44 upstream ports + 5 SCI)
2121
- **31 benchmarks** (20 native + 5 wasm legacy + 4 wasm TinyGo + 2 GC)
22-
- **Wasm engine**: zwasm v0.7.0 (Register IR + ARM64 JIT, 0.9-2.2x of wasmtime)
22+
- **Wasm engine**: zwasm v0.11.0 (Register IR + ARM64/x86_64 JIT, 1.3-2.4x of wasmtime)
2323

2424
## Completed Phases
2525

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ Call WebAssembly modules directly from Clojure:
106106
- v128 SIMD operations
107107
- Predecoded IR with superinstructions for optimized dispatch
108108

109-
> **Performance note**: The Wasm runtime ([zwasm](https://github.com/clojurewasm/zwasm) v0.8.0)
110-
> uses Register IR with ARM64 JIT, achieving 0.9-2.2x of wasmtime performance
111-
> depending on workload (call-heavy: ~2.2x, compute-heavy: ~1x, sieve: CW wins).
109+
> **Performance note**: The Wasm runtime ([zwasm](https://github.com/clojurewasm/zwasm) v0.11.0)
110+
> uses Register IR with ARM64/x86_64 JIT, achieving 1.3-2.4x of wasmtime performance
111+
> depending on workload (call-heavy: ~2.4x, compute-heavy: ~1.3x, sieve: CW wins).
112112
> Module load time is faster (~4ms vs ~5ms).
113113
114114
### Server & Networking

bench/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -222,18 +222,18 @@ Note: gc_stress Zig value (462.7ms) omitted — Zig benchmark uses
222222

223223
## Latest Wasm Runtime Results (2026-02-12)
224224

225-
CW's built-in Wasm runtime (zwasm v0.7.0, Register IR + ARM64 JIT)
225+
CW's built-in Wasm runtime (zwasm v0.11.0, Register IR + ARM64/x86_64 JIT)
226226
vs wasmtime JIT. Same TinyGo-compiled `.wasm` modules, startup subtracted.
227227

228-
| Benchmark | CW (ms) | wasmtime (ms) | Ratio (CW/wt) |
229-
|-----------|----------|---------------|----------------|
230-
| fib | 522 | 227 | 2.3x |
231-
| tak | 2647 | 1274 | 2.1x |
232-
| arith | 0.3 | 0.1 | 3.0x |
233-
| sieve | 8.0 | 4.4 | 1.8x |
234-
| fib_loop | 13.0 | 0.5 | 26.0x |
235-
| gcd | 59.1 | 43.9 | 1.3x |
236-
237-
zwasm reaches 1.3-2.3x of wasmtime performance on compute-heavy benchmarks.
238-
fib_loop and arith show higher ratios due to loop optimization differences.
228+
| Benchmark | CW (ms) | wasmtime (ms) | Ratio (CW/wt) |
229+
|-----------|---------|---------------|----------------|
230+
| fib | 546 | 226 | 2.4x |
231+
| tak | 2620 | 1257 | 2.1x |
232+
| arith | 0.2 | 0.1 | 2.0x |
233+
| sieve | 6.0 | 4.3 | 1.4x |
234+
| fib_loop | 13.6 | 0.9 | 15.1x |
235+
| gcd | 58.7 | 45.3 | 1.3x |
236+
237+
zwasm reaches 1.3-2.4x of wasmtime performance on compute-heavy benchmarks.
238+
fib_loop shows higher ratio due to loop optimization differences.
239239
History tracked in `wasm_history.yaml`.

bench/wasm_history.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,3 +265,46 @@ entries:
265265
wt_warm_ms: 41.1
266266
ratio: 1.4
267267
speedup_vs_prev: 0.97
268+
- id: "zwasm-0.11.0"
269+
date: "2026-02-12"
270+
reason: "zwasm v0.11.0 — x86_64 JIT, tail calls, multi-memory"
271+
commit: c2d5cdd
272+
build: ReleaseSafe
273+
cw_startup_ms: 5.1
274+
wt_startup_ms: 6.3
275+
results:
276+
fib:
277+
desc: "fib(20) x 10000"
278+
cw_warm_ms: 546
279+
wt_warm_ms: 226
280+
ratio: 2.4
281+
speedup_vs_prev: 0.93
282+
tak:
283+
desc: "tak(18,12,6) x 10000"
284+
cw_warm_ms: 2620
285+
wt_warm_ms: 1257
286+
ratio: 2.1
287+
speedup_vs_prev: 0.99
288+
arith:
289+
desc: "arith(1M) x 10"
290+
cw_warm_ms: 0.2
291+
wt_warm_ms: 0.1
292+
ratio: 2.0
293+
sieve:
294+
desc: "sieve(64K) x 100"
295+
cw_warm_ms: 6.0
296+
wt_warm_ms: 4.3
297+
ratio: 1.4
298+
speedup_vs_prev: 1.05
299+
fib_loop:
300+
desc: "fib_loop(25) x 1000000"
301+
cw_warm_ms: 13.6
302+
wt_warm_ms: 0.9
303+
ratio: 15.1
304+
speedup_vs_prev: 0.78
305+
gcd:
306+
desc: "gcd(1M,700K) x 1000000"
307+
cw_warm_ms: 58.7
308+
wt_warm_ms: 45.3
309+
ratio: 1.3
310+
speedup_vs_prev: 0.95

build.zig.zon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
.version = "0.0.1",
44
.dependencies = .{
55
.zwasm = .{
6-
.url = "https://github.com/clojurewasm/zwasm/archive/v0.8.0.tar.gz",
7-
.hash = "zwasm-0.1.0-IBbzF5euDwCAlK2wSrInwc_Y2jwe5gY4-tPwR-6sNVaT",
6+
.url = "https://github.com/clojurewasm/zwasm/archive/v0.11.0.tar.gz",
7+
.hash = "zwasm-0.1.0-IBbzFywwEgDOKsu6xvDSvLOrCvdEgV3LWf39rmzu-9Dj",
88
},
99
},
1010
.fingerprint = 0x62a7be489d633543,

0 commit comments

Comments
 (0)