# Benchmark results

The repository includes a deterministic native benchmark command. Each workload
returns a checksum so that the measured operation cannot be removed as dead code.
The command's portable formatter reports `0 ms` for per-operation time because
MoonBit does not provide one wall-clock API shared by all supported targets. The
wall time below was measured outside the program with PowerShell.

## Environment

- Date: 2026-08-24
- OS: Microsoft Windows 10.0.26200
- MoonBit: `moon 0.1.20260819 (fc2a4ee 2026-08-19)`
- Compiler: `moonc v0.10.9+6e6c44045 (2026-08-19)`
- Target: native
- Fixture size: 64 values or coordinates per workload, three iterations each

## Reproduce

```powershell
moon run cmd/benchmark --target native
1..5 | ForEach-Object {
  Measure-Command {
    moon run cmd/benchmark --target native | Out-Default
  } | Select-Object TotalMilliseconds
}
```

## Deterministic workload output

Captured from `moon run cmd/benchmark --target native`:

```text
Benchmark 'NetCDF_Header_Roundtrip': 3 iterations checksum=-1586837364 in 0 ms (avg 0 ms/op)
Benchmark 'Slice_Hyperslab': 3 iterations checksum=101495334912 in 0 ms (avg 0 ms/op)
Benchmark 'Quality_Control_Scan': 3 iterations checksum=384 in 0 ms (avg 0 ms/op)
Benchmark 'Chunk_Encode_Decode': 3 iterations checksum=63924 in 0 ms (avg 0 ms/op)
Benchmark 'Dataset_Validation': 3 iterations checksum=198 in 0 ms (avg 0 ms/op)
```

## Process wall-time samples

Five consecutive `Measure-Command` samples for the complete native command were:

| Run | TotalMilliseconds |
| ---: | ---: |
| 1 | 208.25 |
| 2 | 134.79 |
| 3 | 125.65 |
| 4 | 131.90 |
| 5 | 155.17 |

These values include MoonBit runner startup and any build-cache work. They are
local reference measurements, not portable performance claims; compare only
under the same toolchain, target, fixture size, and cache state.
