Skip to content

Commit 5f27625

Browse files
committed
Update docs and benchmarks for v0.2.0
- zwasm v0.1.0 → v0.2.0 (build.zig.zon hash updated) - Project version 0.0.1 → 0.2.0, minimum_zig_version → 0.15.2 - Benchmark baselines refreshed (v0.2.0 recording) - Binary size 3.9MB, startup 4.2ms, RSS 8.0MB
1 parent d7f4a29 commit 5f27625

6 files changed

Lines changed: 65 additions & 41 deletions

File tree

.dev/baselines.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Non-Functional Baselines
22

3-
Measured on: 2026-02-13
3+
Measured on: 2026-02-14 (v0.2.0)
44
Platform: macOS ARM64 (Apple M4 Pro), Zig 0.15.2
55
Binary: ReleaseSafe
66

@@ -11,9 +11,9 @@ Fix the regression first. No exceptions without explicit user approval.
1111

1212
| Metric | Baseline | Threshold | Margin | How to measure |
1313
|---------------------|------------|------------|--------|---------------------------------------------|
14-
| Binary size | 3.65 MB | 4.0 MB | +10% | `stat -f%z zig-out/bin/cljw` (after ReleaseSafe build) |
15-
| Startup time | 4.0 ms | 5 ms | 1.25x | `hyperfine -N --warmup 3 --runs 5 './zig-out/bin/cljw -e nil'` |
16-
| RSS (light) | 11.4 MB | 12 MB | +5% | `/usr/bin/time -l ./zig-out/bin/cljw -e nil 2>&1 \| grep 'maximum resident'` |
14+
| Binary size | 3.90 MB | 4.0 MB | +3% | `stat -f%z zig-out/bin/cljw` (after ReleaseSafe build) |
15+
| Startup time | 4.2 ms | 5 ms | 1.19x | `hyperfine -N --warmup 3 --runs 5 './zig-out/bin/cljw -e nil'` |
16+
| RSS (light) | 8.0 MB | 12 MB | +50% | `/usr/bin/time -l ./zig-out/bin/cljw -e nil 2>&1 \| grep 'maximum resident'` |
1717
| Benchmark (any) | see below | 1.2x | +20% | `bash bench/run_bench.sh --quick` |
1818

1919
## Benchmark Regression Policy
@@ -30,30 +30,30 @@ If any benchmark exceeds 1.2x baseline:
3030

3131
Never accept "this feature needs to be slower" — find a way to keep it fast.
3232

33-
## Benchmark Baselines (2026-02-13, single run)
33+
## Benchmark Baselines (2026-02-14, v0.2.0, hyperfine 5 runs)
3434

3535
| Benchmark | Time (ms) | Ceiling (ms) |
3636
|------------------------|-----------|--------------|
3737
| fib_recursive | 18 | 22 |
38-
| fib_loop | 9 | 11 |
39-
| tak | 14 | 17 |
40-
| arith_loop | 10 | 12 |
41-
| map_filter_reduce | 14 | 17 |
42-
| vector_ops | 12 | 14 |
43-
| map_ops | 15 | 18 |
44-
| list_build | 11 | 13 |
45-
| sieve | 13 | 16 |
46-
| nqueens | 19 | 23 |
47-
| atom_swap | 11 | 13 |
48-
| gc_stress | 33 | 40 |
49-
| lazy_chain | 13 | 16 |
50-
| transduce | 12 | 14 |
51-
| keyword_lookup | 15 | 18 |
52-
| protocol_dispatch | 11 | 13 |
53-
| nested_update | 15 | 18 |
54-
| string_ops | 27 | 32 |
55-
| multimethod_dispatch | 11 | 13 |
56-
| real_workload | 13 | 16 |
38+
| fib_loop | 5 | 6 |
39+
| tak | 8 | 10 |
40+
| arith_loop | 5 | 6 |
41+
| map_filter_reduce | 6 | 7 |
42+
| vector_ops | 6 | 7 |
43+
| map_ops | 5 | 6 |
44+
| list_build | 4 | 5 |
45+
| sieve | 5 | 6 |
46+
| nqueens | 15 | 18 |
47+
| atom_swap | 5 | 6 |
48+
| gc_stress | 26 | 31 |
49+
| lazy_chain | 6 | 7 |
50+
| transduce | 7 | 8 |
51+
| keyword_lookup | 12 | 14 |
52+
| protocol_dispatch | 38 | 46 |
53+
| nested_update | 10 | 12 |
54+
| string_ops | 24 | 29 |
55+
| multimethod_dispatch | 5 | 6 |
56+
| real_workload | 10 | 12 |
5757

5858
Wasm benchmarks excluded from regression gate (higher variance, dominated by zwasm).
5959

.dev/binary-size-audit.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Binary Size Audit — Phase 60.3
1+
# Binary Size Audit — v0.2.0
22

3-
Date: 2026-02-13
4-
zwasm: main (acff466), local path dependency
3+
Date: 2026-02-14
4+
zwasm: v0.2.0 (GitHub URL dependency)
55
Platform: macOS ARM64 (Apple Silicon)
66

77
## Binary Size Summary
88

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

1414
## ReleaseSafe Segment Breakdown

.dev/memo.md

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

77
- **All phases through 69 COMPLETE** (deps.edn design cleanup done)
88
- Coverage: 869+ vars (637/706 core, 10/11 protocols, 22/22 reducers, 18 namespaces total)
9-
- Wasm engine: zwasm v0.1.0 (GitHub URL dependency, build.zig.zon).
9+
- Wasm engine: zwasm v0.2.0 (GitHub URL dependency, build.zig.zon).
1010
- Bridge: `src/wasm/types.zig` (751 lines, thin wrapper over zwasm)
1111
- 50 upstream test files, all passing. 6/6 e2e tests pass. 14/14 deps e2e pass.
12-
- Benchmarks: `bench/history.yaml` (60.4 entry = latest baseline)
13-
- Binary: 3.86MB ReleaseSafe (Mac ARM64). See `.dev/binary-size-audit.md`.
12+
- Benchmarks: `bench/history.yaml` (v0.2.0 entry = latest baseline)
13+
- Binary: 3.90MB ReleaseSafe (Mac ARM64). See `.dev/binary-size-audit.md`.
1414

1515
## Strategic Direction
1616

@@ -22,10 +22,7 @@ Native production-grade Clojure runtime. Differentiation vs Babashka:
2222

2323
## Current Task
2424

25-
Phase 69: deps.edn design cleanup — COMPLETE.
26-
- Git dep fetch only with `-P` (cache miss → error otherwise)
27-
- cljw.edn support removed entirely
28-
- deps.edn always read (+0.1ms negligible)
25+
v0.2.0 release prep — zwasm v0.2.0, docs update, benchmarks recorded.
2926

3027
## Previous Task
3128

.dev/roadmap.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Goal: Babashka-competitive startup, single binary distribution, behavioral compa
1919
- **71 skip vars** remaining (70+ permanently JVM, ~1 implementable)
2020
- **50 upstream test files**, all passing
2121
- **31 benchmarks** (20 native + 5 wasm legacy + 4 wasm TinyGo + 2 GC)
22-
- **Wasm engine**: zwasm v0.1.0 (Register IR + ARM64/x86_64 JIT, 1.3-2.3x of wasmtime)
23-
- **Binary**: 3.7MB ReleaseSafe (Mac ARM64)
22+
- **Wasm engine**: zwasm v0.2.0 (Register IR + ARM64/x86_64 JIT, 1.3-2.3x of wasmtime)
23+
- **Binary**: 3.9MB ReleaseSafe (Mac ARM64)
2424

2525
## Completed Phases
2626

bench/history.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,3 +904,30 @@ entries:
904904
string_ops: {time_ms: 25, mem_mb: 21.3}
905905
multimethod_dispatch: {time_ms: 6, mem_mb: 11.6}
906906
real_workload: {time_ms: 10, mem_mb: 18.6}
907+
- id: "v0.2.0"
908+
date: "2026-02-14"
909+
reason: "v0.2.0 release"
910+
commit: "d7f4a29"
911+
build: ReleaseSafe
912+
backend: vm
913+
results:
914+
fib_recursive: {time_ms: 18, mem_mb: 11.6}
915+
fib_loop: {time_ms: 5, mem_mb: 11.6}
916+
tak: {time_ms: 8, mem_mb: 11.6}
917+
arith_loop: {time_ms: 5, mem_mb: 11.6}
918+
map_filter_reduce: {time_ms: 6, mem_mb: 12.2}
919+
vector_ops: {time_ms: 6, mem_mb: 16.7}
920+
map_ops: {time_ms: 5, mem_mb: 15.6}
921+
list_build: {time_ms: 4, mem_mb: 12.2}
922+
sieve: {time_ms: 5, mem_mb: 15.1}
923+
nqueens: {time_ms: 15, mem_mb: 22.6}
924+
atom_swap: {time_ms: 5, mem_mb: 11.6}
925+
gc_stress: {time_ms: 26, mem_mb: 17.4}
926+
lazy_chain: {time_ms: 6, mem_mb: 11.6}
927+
transduce: {time_ms: 7, mem_mb: 11.6}
928+
keyword_lookup: {time_ms: 12, mem_mb: 11.6}
929+
protocol_dispatch: {time_ms: 38, mem_mb: 11.6}
930+
nested_update: {time_ms: 10, mem_mb: 16.8}
931+
string_ops: {time_ms: 24, mem_mb: 21.3}
932+
multimethod_dispatch: {time_ms: 5, mem_mb: 11.6}
933+
real_workload: {time_ms: 10, mem_mb: 18.6}

build.zig.zon

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
.{
22
.name = .clojure_wasm,
3-
.version = "0.0.1",
3+
.version = "0.2.0",
44
.dependencies = .{
55
.zwasm = .{
6-
.url = "https://github.com/clojurewasm/zwasm/archive/v0.1.0.tar.gz",
7-
.hash = "zwasm-0.1.0-IBbzFweBFQCbZ2ZfBEA-8xH-yQ9LavuFbeYIEfrFu4Sf",
6+
.url = "https://github.com/clojurewasm/zwasm/archive/v0.2.0.tar.gz",
7+
.hash = "zwasm-0.2.0-IBbzFwWdGQD-xHjh536a-04lal8Su_TaMzBy5hwn8bR0",
88
},
99
},
1010
.fingerprint = 0x62a7be489d633543,
11-
.minimum_zig_version = "0.15.0",
11+
.minimum_zig_version = "0.15.2",
1212
.paths = .{
1313
"build.zig",
1414
"build.zig.zon",

0 commit comments

Comments
 (0)