# Vow benchmarks (measured)

**Generated:** `2026-07-24T16:54:09Z` (this run only; no estimates)

## Machine

| | |
|--|--|
| CPU | Apple M4 |
| Cores | 10 |
| RAM | 16.0 GiB |
| OS | `Darwin DEEPs-Mac-mini.local 25.5.0 Darwin Kernel Version 25.5.0: Tue Jun  9 22:26:22 PDT 2026; root:xnu-12377.121.10~1/RELEASE_ARM64_T8132 arm64` |

## Toolchains

- **vow:** `0.0.1-dev (Python-hosted compile.py / llvmlite); llvmlite 0.43.0; host Python 3.9.6`
- **gcc:** `Apple clang version 17.0.0 (clang-1700.6.3.2)`
- **go:** `go version go1.26.5 darwin/arm64`
- **python:** `Python 3.9.6`
- **node:** `v23.11.1`

## Methodology

- Cold start: **100** runs of `startup`, report min / median / p95 (ms)
- `fib` / `loop_sum`: **20** runs, min / median / p95 wall time (ms)
- Timing: `not used (not installed); Python time.perf_counter loop`
- Peak RSS: `/usr/bin/time -l` “maximum resident set size” (Darwin, bytes→KB)
- Binary size: unstripped as linked; stripped via `copy then /usr/bin/strip`
- C flags: `-O2`; Go: `go build (default)`
- Vow opts: `Vow compile.py default (LLVM O3 + runtime -O2; not user-selectable in this tree)`
- Anti-DCE: fib/loop_sum fold result into process exit code; C/Go also use volatile/sink

### Caveats

- **Vow’s compiler is Python-hosted** (`compile.py` + llvmlite). Compile times measure that host path, **not** a future native/self-hosted toolchain.
- Vow currently always runs an **LLVM O3** IR pass pipeline; C comparison uses **`-O2`**. That is slightly uneven; do not read micro-wins as “Vow beats clang -O3”.
- **Vow `hello` skipped:** `print` is PARTIAL in `STATUS.md` (native codegen unsupported).
- **Vow `loop_sum` skipped:** `int64` is PARTIAL in `STATUS.md`; sum `1..1e7` overflows `int`.
- Interpreted languages: binary size **N/A**; cold start includes interpreter/VM boot.
- Peak RSS via `/usr/bin/time -l` is approximate but per-invocation.
- **`fib(30)` wall times are spawn-dominated** on this machine (~3 ms process floor). A follow-up check (50 runs) saw Vow ≈ clang `-O2` ≈ clang `-O3` within noise; matching exit code **40** (`fib(30)&255`) confirms the work was not DCE’d. Do **not** treat “Vow median &lt; C median” in the table below as a meaningful compute win.

### Where Vow loses (same prominence as wins)

- **Compile time:** Vow `startup` **0.43 s** vs C **0.03 s** (~14×) — Python-hosted compiler.
- **Binary size:** Vow ~**51 KiB** vs C ~**16 KiB** (~3×) — runtime linked in.
- **Feature gaps:** no Vow `hello` (no native `print`); no Vow `loop_sum` (`int64` not WORKS) — C/Go/Python/Node all measured there.
- **Cold start:** Vow median **1.785 ms** vs C **1.839 ms** (essentially tied); both beat Go / Python / Node. Not a large win.

## Skips

- `vow:hello`: print/stdout is PARTIAL in STATUS.md (native codegen unsupported)
- `vow:loop_sum`: int64 is PARTIAL in STATUS.md; sum 1..1e7 overflows int

## Checksum exits (sanity)

Same algorithm must produce the same exit code across languages.

```
{
  "vow:startup": 0,
  "vow:fib": 40,
  "c:hello": 0,
  "c:startup": 0,
  "c:fib": 40,
  "c:loop_sum": 64,
  "go:hello": 0,
  "go:startup": 0,
  "go:fib": 40,
  "go:loop_sum": 64,
  "python:hello": 0,
  "python:startup": 0,
  "python:fib": 40,
  "python:loop_sum": 64,
  "node:hello": 0,
  "node:startup": 0,
  "node:fib": 40,
  "node:loop_sum": 64
}
```

## Cold start (`startup`)

| lang | status | min / median / p95 (ms) | peak RSS (KB) | bytes (raw) | bytes (stripped) | compile (s) | note |
|------|--------|-------------------------|---------------|-------------|------------------|-------------|------|
| vow | measured | 1.550 / 1.785 / 2.211 | 1376 | 51080 | 51000 | 0.4312 |  |
| c | measured | 1.512 / 1.839 / 2.683 | 1344 | 16840 | 16832 | 0.0344 |  |
| go | measured | 2.189 / 2.677 / 3.901 | 3312 | 1749218 | 1673824 | 0.0758 |  |
| python | measured | 11.757 / 13.519 / 16.263 | 8448 | N/A | N/A | — |  |
| node | measured | 16.134 / 16.771 / 17.609 | 39312 | N/A | N/A | — |  |

## fib(30) wall time

| lang | status | min / median / p95 (ms) | peak RSS (KB) | bytes (raw) | bytes (stripped) | compile (s) | exit | note |
|------|--------|-------------------------|---------------|-------------|------------------|-------------|------|------|
| vow | measured | 3.466 / 3.905 / 4.388 | 1360 | 51096 | 50992 | 0.1656 | 40 |  |
| c | measured | 3.745 / 4.321 / 5.038 | 1344 | 16872 | 16832 | 0.0401 | 40 |  |
| go | measured | 4.817 / 5.141 / 6.091 | 3856 | 2214674 | 2115232 | 0.0907 | 40 |  |
| python | measured | 122.757 / 128.264 / 143.341 | 8448 | N/A | N/A | — | 40 |  |
| node | measured | 21.348 / 22.065 / 25.606 | 43728 | N/A | N/A | — | 40 |  |

## loop_sum wall time

| lang | status | min / median / p95 (ms) | peak RSS (KB) | bytes (raw) | bytes (stripped) | compile (s) | exit | note |
|------|--------|-------------------------|---------------|-------------|------------------|-------------|------|------|
| vow | not_supported | — | — | N/A | N/A | — | — | int64 is PARTIAL in STATUS.md; sum 1..1e7 overflows int |
| c | measured | 1.514 / 1.655 / 1.970 | 1328 | 16840 | 16832 | 0.0363 | 64 |  |
| go | measured | 4.630 / 4.830 / 4.981 | 3824 | 2214658 | 2115240 | 0.0893 | 64 |  |
| python | measured | 207.566 / 230.988 / 265.694 | 8400 | N/A | N/A | — | 64 |  |
| node | measured | 23.856 / 24.906 / 33.174 | 46112 | N/A | N/A | — | 64 |  |

## hello wall time

| lang | status | min / median / p95 (ms) | peak RSS (KB) | bytes (raw) | bytes (stripped) | compile (s) | exit | note |
|------|--------|-------------------------|---------------|-------------|------------------|-------------|------|------|
| vow | not_supported | — | — | N/A | N/A | — | — | print/stdout is PARTIAL in STATUS.md (native codegen unsupported) |
| c | measured | 1.847 / 2.280 / 2.613 | 1328 | 33432 | 33440 | 0.0470 | 0 |  |
| go | measured | 2.972 / 3.667 / 4.264 | 3952 | 2492466 | 2384432 | 0.6657 | 0 |  |
| python | measured | 13.192 / 13.365 / 13.490 | 8400 | N/A | N/A | — | 0 |  |
| node | measured | 19.131 / 19.852 / 20.055 | 41424 | N/A | N/A | — | 0 |  |

## Reproduce

```bash
cd vow/bench && ./run.sh
```

Outputs: `bench/benchmarks.json`, repo-root `BENCHMARKS.md`.

