Skip to content

Commit 93b274c

Browse files
committed
Update benchmarks and docs for zwasm v1.1.0
Record full benchmark suite (31 benchmarks) with zwasm v1.1.0. Refresh wasm runtime comparison tables with latest 4-runtime data (23 benchmarks including GC). zwasm wins 14/23 vs wasmtime. Update binary size references (4.07MB).
1 parent b11fcc6 commit 93b274c

4 files changed

Lines changed: 48 additions & 41 deletions

File tree

.dev/binary-size-audit.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Platform: macOS ARM64 (Apple Silicon)
88

99
| Build mode | Size |
1010
|-------------|-------|
11-
| ReleaseSafe | 3.9MB |
12-
| Debug | 12MB |
11+
| ReleaseSafe | 4.07MB |
12+
| Debug | 12MB |
1313

1414
## ReleaseSafe Segment Breakdown
1515

@@ -29,7 +29,7 @@ Platform: macOS ARM64 (Apple Silicon)
2929
| __DATA_CONST | <1KB | GOT entries |
3030
| __LINKEDIT | 492KB | Symbol tables, relocations |
3131

32-
Total on-disk: ~3.9MB (3,923KB segments)
32+
Total on-disk: ~4.07MB
3333

3434
## Bootstrap Cache
3535

.dev/memo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ patterns only. Libraries requiring heavy Java interop are out of scope.
2626

2727
Differentiation vs Babashka:
2828
- Ultra-fast execution (19/20 benchmark wins)
29-
- Tiny single binary (3.85MB macOS, ~14MB Linux static)
29+
- Tiny single binary (4.07MB macOS, ~14MB Linux static)
3030
- Wasm FFI (unique: call .wasm modules from Clojure)
3131
- deps.edn compatible project model (Clojure CLI subset)
3232

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Call WebAssembly modules directly from Clojure:
180180
> **Performance note**: The Wasm runtime ([zwasm](https://github.com/clojurewasm/zwasm))
181181
> uses Register IR with ARM64/x86_64 JIT. Full Wasm 3.0 support (all 9 proposals
182182
> including GC, function references, SIMD, exception handling).
183-
> zwasm wins 13/21 benchmarks vs wasmtime, with ~50x smaller binary.
183+
> zwasm wins 14/23 benchmarks vs wasmtime, with ~43x smaller binary.
184184
185185
### Server & Networking
186186

bench/README.md

Lines changed: 43 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ bash bench/wasm_bench.sh --bench=fib
7575

7676
Compares CW's built-in Wasm runtime (zwasm) against wasmtime JIT.
7777
Both execute the same TinyGo-compiled `.wasm` modules.
78-
For full multi-runtime comparison (5 runtimes, 21 benchmarks), see zwasm's
78+
For full multi-runtime comparison (4 runtimes, 23 benchmarks), see zwasm's
7979
`bench/record_comparison.sh`.
8080

8181
| Option | Effect |
@@ -232,7 +232,7 @@ Measured as ReleaseSafe builds on ARM64 macOS.
232232

233233
| Runtime | Version | Binary Size |
234234
|----------------|--------------|-------------|
235-
| **zwasm** | 1.0.0 | **1.3 MB** |
235+
| **zwasm** | 1.1.0 | **1.3 MB** |
236236
| wasmtime | 41.0.1 | 56.3 MB |
237237
| bun | 1.3.8 | 57.1 MB |
238238
| node | v24.13.0 | 61.7 MB |
@@ -241,58 +241,65 @@ Measured as ReleaseSafe builds on ARM64 macOS.
241241
zwasm is **1/50th** the size of wasmtime and **1/100th** of wasmer.
242242
Full Wasm 3.0 support (all 9 proposals including GC) in 1.1 MB.
243243

244-
## Latest Wasm Runtime Results (2026-02-14)
244+
## Latest Wasm Runtime Results (2026-02-18)
245245

246246
CW's built-in Wasm runtime (zwasm v1.1.0, Register IR + ARM64/x86_64 JIT)
247-
vs 4 other Wasm runtimes. Apple M4 Pro, 48GB RAM.
248-
21 benchmarks (WAT 5, TinyGo 11, Shootout 5), hyperfine 3 runs + 1 warmup.
247+
vs 3 other Wasm runtimes. Apple M4 Pro, 48GB RAM.
248+
23 benchmarks (WAT 5, TinyGo 11, Shootout 5, GC 2), hyperfine 3 runs + 1 warmup.
249249

250250
### WAT Benchmarks (handwritten)
251251

252-
| Benchmark | zwasm (ms) | wasmtime | wasmer | bun | node |
253-
|-----------|------------|----------|--------|--------|--------|
254-
| fib | 92.4 | 52.8 | 51.3 | **37.3** | 48.8 |
255-
| tak | **10.6** | 10.7 | 13.8 | 18.6 | 25.3 |
256-
| sieve | **3.6** | 7.1 | 11.5 | 16.7 | 29.1 |
257-
| nbody | 51.7 | 24.5 | **27.7** | 32.3 | 38.1 |
258-
| nqueens | **2.5** | 8.4 | 8.2 | 14.7 | 23.9 |
252+
| Benchmark | zwasm (ms) | wasmtime | bun | node |
253+
|-----------|------------|----------|----------|--------|
254+
| fib | 50.6 | 48.6 | **31.2** | 45.5 |
255+
| tak | **7.4** | 9.6 | 16.9 | 25.3 |
256+
| sieve | **4.1** | 6.6 | 15.7 | 26.0 |
257+
| nbody | **10.5** | 20.9 | 31.8 | 36.1 |
258+
| nqueens | **2.1** | 4.8 | 14.3 | 21.7 |
259259

260260
### TinyGo Benchmarks (compiled .wasm)
261261

262-
| Benchmark | zwasm (ms) | wasmtime | wasmer | bun | node |
263-
|-------------|------------|----------|----------|--------|--------|
264-
| tgo_fib | 52.0 | 27.5 | **9.9** | 42.5 | 47.0 |
265-
| tgo_tak | 9.6 | 9.6 | **5.0** | 18.0 | 25.0 |
266-
| tgo_arith | **2.4** | 6.5 | 9.0 | 14.6 | 21.6 |
267-
| tgo_sieve | **3.5** | 6.4 | 11.5 | 16.3 | 27.6 |
268-
| tgo_fib_loop| **2.8** | 5.3 | 10.7 | 15.1 | 23.6 |
269-
| tgo_gcd | **1.5** | 5.3 | 11.5 | 14.5 | 27.5 |
270-
| tgo_nqueens | 44.1 | 41.6 | **9.2** | 47.6 | 99.0 |
271-
| tgo_mfr | 71.8 | 35.1 | **9.7** | 43.8 | 84.2 |
272-
| tgo_list | 56.0 | 56.6 | **10.9** | 41.7 | 159.7 |
273-
| tgo_rwork | 8.1 | **7.1** | 11.1 | 18.6 | 30.2 |
274-
| tgo_strops | 36.7 | 31.5 | **11.8** | 33.5 | 96.5 |
262+
| Benchmark | zwasm (ms) | wasmtime | bun | node |
263+
|-------------|------------|----------|--------|--------|
264+
| tgo_fib | 35.9 | **27.6** | 41.2 | 45.9 |
265+
| tgo_tak | **7.4** | 8.3 | 16.7 | 24.8 |
266+
| tgo_arith | **1.8** | 4.3 | 13.6 | 21.7 |
267+
| tgo_sieve | **4.5** | 5.8 | 16.2 | 29.5 |
268+
| tgo_fib_loop| **2.7** | 6.0 | 20.3 | 23.2 |
269+
| tgo_gcd | **2.0** | 4.4 | 15.2 | 22.3 |
270+
| tgo_nqueens | 41.4 | **37.9** | 52.5 | 98.0 |
271+
| tgo_mfr | 47.2 | **30.8** | 40.3 | 81.7 |
272+
| tgo_list | **37.2** | 66.7 | 40.6 | 151.5 |
273+
| tgo_rwork | **5.8** | 7.8 | 18.7 | 24.5 |
274+
| tgo_strops | 34.7 | **27.5** | 32.4 | 89.1 |
275275

276276
### Shootout Benchmarks (WASI)
277277

278-
| Benchmark | zwasm (ms) | wasmtime | wasmer | bun | node |
279-
|---------------|------------|----------|---------|----------|---------|
280-
| st_fib2 | 1361.2 | 683.3 | 684.7 | **371.3** | 397.1 |
281-
| st_sieve | 232.5 | 200.2 | 198.0 | **177.5** | 627.0 |
282-
| st_nestedloop | 5.3 | **4.3** | 10.3 | 15.8 | 25.7 |
283-
| st_ackermann | **7.0** | 8.6 | 14.6 | 17.5 | 28.5 |
284-
| st_matrix | 312.7 | 92.1 | 93.8 | **85.2** | 168.9 |
278+
| Benchmark | zwasm (ms) | wasmtime | bun | node |
279+
|---------------|------------|----------|-----------|---------|
280+
| st_fib2 | 1014.1 | 656.2 | **345.2** | 375.0 |
281+
| st_sieve | **169.1** | 192.1 | 178.1 | 618.8 |
282+
| st_nestedloop | **2.8** | 4.4 | 17.0 | 25.3 |
283+
| st_ackermann | **4.5** | 6.7 | 16.7 | 25.6 |
284+
| st_matrix | 280.9 | 85.7 | **81.1** | 160.3 |
285+
286+
### GC Benchmarks (Wasm GC proposal)
287+
288+
| Benchmark | zwasm (ms) | wasmtime | bun | node |
289+
|-----------|------------|----------|--------|--------|
290+
| gc_alloc | 17.5 | **7.9** | 14.6 | 26.7 |
291+
| gc_tree | 124.0 | 28.9 | **18.5** | 29.5 |
285292

286293
### Summary
287294

288-
**zwasm wins (fastest)**: 9/21 benchmarks — dominant on short-running tasks
295+
**zwasm wins (fastest)**: 14/23 benchmarks — dominant on short-running tasks
289296
where startup overhead matters (sieve, nqueens, arith, gcd, fib_loop, etc.)
290297

291-
**vs wasmtime**: zwasm wins 10/21, tie 2, wasmtime wins 9.
292-
zwasm excels at fast startup (1.1 MB vs 56 MB binary, 3 MB vs 12 MB RSS).
298+
**vs wasmtime**: zwasm wins 14/23, wasmtime wins 9.
299+
zwasm excels at fast startup (1.3 MB vs 56 MB binary, 3 MB vs 12 MB RSS).
293300
wasmtime excels at heavy compute (optimizing JIT with Cranelift backend).
294301

295302
**Memory usage**: zwasm consistently uses 3-5 MB RSS vs 12-13 MB (wasmtime),
296-
30-33 MB (wasmer), 31-34 MB (bun), 41-44 MB (node).
303+
31-36 MB (bun), 41-44 MB (node).
297304

298305
Data source: `zwasm/bench/runtime_comparison.yaml`. History tracked in `wasm_history.yaml`.

0 commit comments

Comments
 (0)