# Benchmarks

The benchmark workload is fixed in `src/benchmark_data.mbt`:

- 32 features: holes, shafts, planes, and cylinders;
- four calibrated devices with identical feature support and different accuracies;
- 32 centered observations with three samples per feature;
- deterministic planning, aggregate batch summary, and strict CSV parsing paths.

Run the measurement locally with the repository toolchain:

```bash
moon bench --release --target native
```

Recorded on 2026-08-23 with MoonBit `0.1.20260807`, Windows x64, native release target:

| Case | Mean | Spread shown by runner | Runs |
| --- | ---: | ---: | ---: |
| deterministic planning | 32.07 µs | ±1.72 µs | 10 × 3,251 |
| batch summary | 712.04 ns | ±8.29 ns | 10 × 100,000 |
| strict CSV parsing | 97.77 µs | ±2.83 µs | 10 × 1,051 |

The benchmark runner reports a range as well; the captured runs were 29.75–34.26 µs, 696.13–720.23 ns, and 92.98–102.21 µs respectively. These are local engineering measurements, sensitive to CPU, operating system, compiler, runtime, and background load. They are included for reproducibility and regression comparison, not as hardware-independent performance guarantees.
