# zero head-to-head scorecard

> Gate smoke · generated 2026-12-01 13:47 UTC · positioning, not ranking. Every axis names its own winner; losses stay visible.


## Run metadata

| mode | generated | build | repo | framework |
|---|---|---|---|---|
| gate | 2026-12-01 13:47:27 UTC | 53 | ng/zero-soak | zero @ main (32b23ab) · https://gitea.pi/ng/zero.git |

## Executive summary

| Framework | Axes won |
|---|---:|
| zero | 10 of 10 |
| gofr | 0 of 10 |
| fastapi | 0 of 10 |
| axum | 0 of 10 |

zero leads read-heavy throughput with **5,803 req/s** (3.4× GoFr). Remaining losses are listed in [Where we are behind](#where-we-are-behind-and-what-to-fix).


## Honest scorecard (median of runs; raw JSON retained)

| Metric | zero | gofr | fastapi | axum | Best |
|---|---:|---:|---:|---:|---|
| p50 [read-heavy] | 4.35 | 15.17 | 574.47 | 48.93 | zero |
| p95 [read-heavy] | 18.43 | 65.11 | 825.63 | 66.89 | zero |
| p99 [read-heavy] | 30.22 | 101.69 | 877.99 | 71.81 | zero |
| rps [read-heavy] | 5803.43 | 1682.20 | 76.51 | 744.11 | zero |
| errors [read-heavy] | 0.00 | 0.00 | 0.00 | 0.00 | zero |
| p50 [balanced] | 7.80 | 16.69 | 55.01 | 61.41 | zero |
| p95 [balanced] | 32.00 | 92.10 | 2994.33 | 109.02 | zero |
| p99 [balanced] | 68.00 | 301.14 | 5392.67 | 396.44 | zero |
| rps [balanced] | 3121.11 | 788.67 | 53.25 | 528.77 | zero |
| errors [balanced] | 0.00 | 0.00 | 0.06 | 0.00 | zero |

Latency in ms, throughput in req/s, errors as a rate. Percentiles use the steady stage only (warmup/spike excluded; the window is derived from each run's own timestamps, so the 10 s smoke gate and 60 s bench are both correct).


> Gate-smoke runs (`round=smoke`) are included for visibility. They are threshold checks with a 10 s steady stage, **not** publishable bench numbers.

## Footprint & breadth tax

| Framework | Idle MiB | Peak MiB | Cold start s | Binary MiB | Deps | Config lines | App LOC |
|---|---:|---:|---:|---:|---:|---:|---:|
| zero | 43.15 | 60.77 | 0.00 | 32.79 | 1 | 23 | 238 |
| gofr | 32.17 | 51.90 | 0.00 | 55.86 | 101 | 14 | 161 |
| fastapi | 36.52 | 71.16 | 1.00 | — | 2 | 20 | 87 |
| axum | 5.10 | 15.67 | 1.00 | 3.30 | 14 | 5 | 151 |

## Run configuration

The only intentional difference is how each stack waits for a free SQLite connection. Everything else is held constant.

| | zero | gofr | fastapi | axum |
|---|---|---|---|---|
| Connections | 1 (`SQLITE_POOL_SIZE`) | 1 (`DB_MAX_OPEN_CONNECTION`) | 1 per request | 1 (`max_connections`) |
| If all busy | waits | queues | opens a new one | queues |

Held constant: WAL journal, `NORMAL` sync, 5 s busy timeout, 1 process (1 uvicorn worker).

- **zero build:** ReleaseFast (see `results/zero/zero.version.json`)
- **Logging:** quiet — zero logs nothing, gofr fatal, fastapi critical, axum off (`COMPARE_QUIET_LOGS=1`; flip to `0` to change)
- **Timeouts:** health gate 120 s; k6 10 s warmup + 10 s steady + 10 s spike; pass = under 1% failed requests and p95 under 2 s

> Check the **errors** row before believing a latency or RPS win. A pool that fails instead of waiting makes the survivors look fast.


## Design internals (framework-level evidence)

This CRUD scorecard is dominated by SQLite and JSON encoding. The framework's own hot-path micro-benchmarks — allocations per dispatch, route-match allocations and match time — are in the soak report's **Framework probes** section (`soak/report/index.html#probes`). They measure the framework, not the application.


## Where we are behind (and what to fix)

- No axis lost in this run — check methodology before believing it.

## Reproduce

```bash
bash compare/run.sh bench
python3 compare/report.py
```

Full methodology and pinned versions: `compare/contract.md`, `results/<fw>/<fw>.version.json`, `results/<fw>-<mix>-<round>.raw.json`.

Operational evidence (leak gates, chaos recovery): the zero-soak report.
