# Reproducible performance checks

The benchmark fixture is deliberately fixed: a 128 x 96 grayscale image (12,288 pixels), generated by the linear-congruential recurrence `state = (109 * state + 1021) mod 65536` from seed `31415`.  The successor image is that texture translated one pixel right with horizontal wraparound.

Run the benchmark with:

```powershell
moon bench benchmarks --target wasm-gc --release --deny-warn
```

The two benchmark rows are kept separate:

- `bench detector 128x96 fixed LCG translation fixture` measures Shi-Tomasi detection on the source frame.
- `bench tracker 128x96 fixed LCG translation fixture` measures tracker construction and one frame step using the detected source seeds and translated successor.

Captured on 2026-08-21 with `moon 0.1.20260814`, `moonc v0.10.8+8606a5800`, release mode, and target `wasm-gc`:

```text
detector 128x96 fixed LCG translation fixture
  mean 112.91 ms ± 28.72 ms; range 95.13 ms … 192.18 ms in 10 × 1 runs
tracker 128x96 fixed LCG translation fixture
  mean 9.94 ms ± 377.89 µs; range 9.32 ms … 10.37 ms in 10 × 11 runs
Total tests: 2, passed: 2, failed: 0.
```

Record future results together with complete `moon --version` output, target, release flag, fixture dimensions, and the command above. Retain raw output rather than rounding it into a single headline number.

These measurements are regression evidence for this fixture and toolchain only. They are not a universal performance claim: CPU model, operating system, MoonBit version, compiler backend, build mode, and background load can all change the result.

## Analytics reporting

Trajectory analytics and NDJSON rendering are deterministic library operations, but they are not included in the tracker benchmark above. No throughput, allocation, or latency claim is made for them yet. The renderer emits one short JSON object at a time into a `StringBuilder`; consumers that need performance evidence should benchmark `analyze` and `export_ndjson` with a fixed trajectory document, target, compiler version, and captured raw output.
