# Benchmark Results

This report records a reproducible native workload for the current checkout. The wall-clock values include the warm `moon run` command and program startup; they are not presented as isolated kernel timings.

## Environment

- Date: 2026-08-24
- OS: Windows NT 10.0.26200.0
- Moon: `0.1.20260819 (fc2a4ee 2026-08-19)`
- Moonc: `v0.10.9+6e6c44045 (2026-08-19)`
- Moonrun: `0.1.20260819 (fc2a4ee 2026-08-19)`
- Backend: native, release mode
- CPU model: not exposed by the local execution environment

## Workload

The executable is `examples/benchmark_demo` and runs:

| Case | Workload |
| --- | --- |
| `fft_radix2` | 256-point FFT, 200 iterations, 2,048,000 theoretical FLOPs |
| `iir_biquad` | 1,000 samples, 100 iterations, 500,000 nominal operations |
| `fir_filter` | 31 taps, 1,000 samples, 50 iterations, 1,550,000 nominal operations |
| `matrix_inversion` | 8×8 inversion, 20 iterations, 6,826.67 theoretical FLOPs |
| `frame_analyzer` | 4,096 samples, 256-point frames, 128-sample hop, 31 emitted frames |

The deterministic workload output was:

```text
MoonBit DSP native benchmark workload
fft_radix2: {
  transform_size: 256,
  iterations: 200,
  total_flops: 2048000,
  mflops: 2.048,
}
iir_biquad: {
  filter_name: "Butterworth Biquad IIR",
  sample_count: 1000,
  iterations: 100,
  total_operations: 500000,
  throughput_msmps: 0.1,
}
fir_filter: {
  filter_name: "Circular Delay Line FIR",
  sample_count: 1000,
  iterations: 50,
  total_operations: 1550000,
  throughput_msmps: 0.05,
}
matrix_inversion: { matrix_dim: 8, iterations: 20, total_flops: 6826.666666666666 }
frame_analyzer: frames=31, samples=4096
```

## Warm wall-clock runs

Command:

```powershell
1..5 | ForEach-Object {
  $m = Measure-Command { moon run --target native --release examples/benchmark_demo | Out-Null }
  [PSCustomObject]@{ Run = $_; Milliseconds = [math]::Round($m.TotalMilliseconds, 3) }
}
```

Measured values:

| Run | Milliseconds |
| ---: | ---: |
| 1 | 127.800 |
| 2 | 107.960 |
| 3 | 111.890 |
| 4 | 125.660 |
| 5 | 115.870 |

Median: **115.871 ms**.

These numbers are a local baseline for regression comparison. They should not be compared across machines without repeating the same workload and recording the toolchain/backend.
