# Reproducible performance measurements

Measured 2026-10-13 08:58  on AMD Ryzen 9 5950X 16-Core Processor.
OS: Ubuntu 24.04 x64. GCC 13.3, CMake Release, Qt 6.8.3.
The console benchmark times simulation steps without rendering or sleep.
Construction and preflight are outside the timed region.

```bash
source scripts/env.sh
build/release/factoryforge-cli --benchmark 1
build/release/factoryforge-cli --benchmark 20
build/release/factoryforge-cli --benchmark 50
```

Each vehicle has three deliveries in a 64-column loading lane. Every scenario
completed 311 ticks and delivered all orders with no waiting. Results vary with
host load and are observations, not guarantees for arbitrary maps.

| Vehicles | Mean tick | Peak tick | Deliveries |
| --- | --- | --- | --- |
| 1 | 0.077 ms | 0.153 ms | 3 |
| 20 | 12.326 ms | 16.743 ms | 60 |
| 50 | 32.383 ms | 44.287 ms | 150 |

The initial 50-vehicle implementation measured 38.425 ms mean and 286.578 ms peak.
Connected-component caching, nearest-candidate lower bounds and compact hash keys
removed unnecessary route searches and reduced the observed peak. Reservation
iteration does not select routes, so hash-container ordering cannot change the
simulation outcome. Regression tests keep the same puzzle results and exercise
coordinate/time separation at the 128-cell map boundary.

The rolling planner is conservative and not globally optimal. Narrow layouts
can still deadlock and report waiting. The benchmark's broad lanes are not a
worst-case navigation or rendering workload. A logical tick is 100 ms and the
GUI remains responsive because the worker owns simulation computation.
