# Benchmark notebook

The page compares **Before** (the original published series) with **Now** (a new measurement series). These are single observations on independently generated inputs, not statistical estimates of code-only speedup.

## Published methodology

- Every integer size from 11 through 90 decimal digits, inclusive.
- One fresh balanced semiprime per size, generated by `CompositeGenerator.exe --range 11 90` (default count 1).
- One new `qs.exe` process per input, in ascending size order, no warm-up or repetitions.
- Release build; default factorization parameters and default parallelism.
- Elapsed wall time measured around process creation through process exit using Python's monotonic `perf_counter`. Includes runtime startup, JIT, all pipeline stages and artifact I/O. Generation is outside the timed region.
- Default console presentation, redirected to a per-input UTF-8 log. Each input receives a new run directory. No resume or reused algorithm artifacts.
- “Cold” means a fresh process; OS filesystem caches are not flushed. The machine was used for light site editing and browser review during collection; no other factorization or build was deliberately run concurrently with the measurements.

The previous chart described end-to-end timings, fresh balanced semiprimes and default parameters, and identified the Ryzen 7 5800X / 32 GB machine. Its original inputs, exact runtime patch, output redirection and timer implementation were not checked into this showcase. The new run reproduces that published methodology, not an unavailable exact historical harness. Startup overhead matters especially at small sizes; different semiprimes also differ in difficulty. A smaller Now value is an observed reduction in elapsed time, not proof of a particular optimization's effect.

## Now provenance

- Collected: 2026-09-05.
- Source commit: `8e8fd87d13a7b14a7573f41a3000c86a1966e097` (clean authoritative local source checkout).
- CPU: AMD Ryzen 7 5800X, 8 cores / 16 logical processors.
- Memory: 31.9 GiB reported physical memory (32 GB installed).
- OS: Windows, build 10.0.26200, x64.
- SDK: .NET 10.0.111; runtime: Microsoft.NETCore.App 10.0.11, x64.
- Both targeted Release builds completed with zero warnings and zero errors.

```powershell
dotnet build QS/QS.csproj -c Release
dotnet build CompositeGenerator/CompositeGenerator.csproj -c Release
```

From this showcase checkout, after building the authoritative source:

```powershell
python scripts/measure.py <source-checkout>
python scripts/verify-benchmarks.py
python scripts/render-benchmarks.py
```

`measure.py` refuses to overwrite an existing Now series. Archive the current data first if intentionally collecting another series. `verify-benchmarks.py` checks every recovered factor pair against its input and exports the factor evidence before temporary run directories are removed. Rendering uses only the saved JSON and does not run the factorizer.

## Files

- `before.json`: all 80 original values, preserved from `js/benchmarks.js` at showcase commit `82acbbd`.
- `now.json`: all 80 new elapsed times, input integers and exit codes. Precision is retained for audit, not a claim of microsecond repeatability.
- `inputs.txt`: the generator's exact output, one integer per line.
- `factors.json`: recovered factors and exact multiplication verification for all 80 inputs.
- `logs/`: unedited stdout/stderr from each run.
- `comparison.csv`: both series and new input integers, for download. Treat the input column as text in spreadsheet software to retain all digits.
- `runs/`: disposable pipeline artifacts, ignored by Git and removed after validation.

Before values retain their original one-decimal-second precision. The plot is generated into static HTML along with a complete accessible table; JavaScript adds the slider, pointer exploration and log/linear scales. No benchmark runs in a visitor's browser.
