Skip to content

chore(bench): regenerate metrics on the reference host - #753

Merged
johnleider merged 3 commits into
masterfrom
chore/metrics-regen-archbox
Jul 30, 2026
Merged

chore(bench): regenerate metrics on the reference host#753
johnleider merged 3 commits into
masterfrom
chore/metrics-regen-archbox

Conversation

@johnleider

@johnleider johnleider commented Jul 30, 2026

Copy link
Copy Markdown
Member

One PR, replacing four. #734, #748 and #754 are closed and folded here or made obsolete by #749.

First regeneration since #749 moved benchmark measurement off CI onto the fixed reference workstation. Every number moved because the machine changed, not the code.

CPU
prev Intel Xeon 6973P-C GHA runner, ci: true
next Intel i9-7980XE reference host, idle 0.08%, governor performance

The suite reads ~40% slower. That is a real single-thread gap, verified independently on the 13 pure-JS calibration anchors from the old artifact — no v0 code involved — which show the same ~30% median deficit, worst on allocation/hash-heavy work (map build −51.9%, string build −52.2%) and mildest on tight loops (array sum −19.4%). Skylake-X against Granite Rapids, plus Skylake-X's mesh interconnect on cache-sensitive workloads.

Tier badges: 14 of 16 unchanged

An earlier pass showed four demotions; two were an artefact of running under the powersave governor, which host-guard.ts warns about and which the first artifacts recorded. Re-measured with the governor set:

feature was now verdict
createDataGrid fast good correct — Compute spans (10,000 items) is 39.5ms
createFilter fast good correct — Update query ×10 (10,000 items) is 39.3ms/op
createRegistry blazing blazing recovered
useProxyRegistry blazing blazing recovered

Both remaining demotions cross 33.4ms — two frames at 60fps. That threshold is anchored to something a user can feel, unlike the per-item budgets which are engineering conventions. On this host those operations genuinely do miss it, so the badges are telling the truth and I'd keep them. Retuning thresholds to recover a badge is the goalpost move.

Why the whole history was re-measured

metrics:history --force, not a top-up. 1.0.0 and 1.0.1 were Xeon numbers; adding a reference-host 1.0.2 beside them would have put a 40% step in the middle of every sparkline. All three points now share one fingerprint. 1.0.2 had no snapshot at all before this.

Also included: the docs page describing tiers was wrong

guide/fundamentals/benchmarks.md documented a scheme replaced in #539 back on 7 July — ops/s tier cards bucketed by O(1)/O(n)/O(n²), a complexity-detection table, and a claim that group tiers are the average of their benchmarks. The code grades cost (per-item µs and latency against frame budgets, worst axis wins) and takes the worst group, never the average. Replaced with what the code does, −64/+31 lines. Also drops pnpm metrics from that page, since following it now produces artifacts CI rejects.

Verification

  • Host verified idle at run start (0.08% busy); the guard would have refused otherwise.
  • pnpm metrics:check — ok. pnpm metrics:verify on two fresh median-of-3 samples: feature median 0.79%, worst 2.42%.
  • Artifacts are -diff in .gitattributes; compare with pnpm metrics:delta, not raw JSON.

First regeneration since #749 moved measurement off CI. Every number here was
produced on the reference workstation; the series was previously measured on
GitHub runners, so this is a machine change, not a code change.

  prev  Intel Xeon 6973P-C     (GHA, ci: true)
  next  Intel i9-7980XE        (reference host, idle 0.08%)

The whole suite reads 39.56% slower at the median. Nothing regressed -- the
Xeon is a current-generation server part and the reference box is a 2017
desktop. This is exactly the case the env fingerprint exists to make visible,
and the case no scale factor can bridge.

Because of that, the per-version history was re-measured with --force rather
than topped up: leaving 1.0.0 and 1.0.1 on Xeon numbers while 1.0.2 came from
the reference host would have put a 40% step in the middle of every sparkline.
All three points now carry the same fingerprint. 1.0.2 also had no snapshot
before this.

Four of sixteen feature badges demote on identical code, purely because tiers
are absolute thresholds and the reference machine is slower:

  createRegistry     blazing -> fast
  useProxyRegistry   blazing -> fast
  createDataGrid     fast    -> good
  createFilter       fast    -> good

metrics.json now carries _env instead of _apparatus.
@johnleider johnleider added this to the v1.0.x milestone Jul 30, 2026
@johnleider johnleider self-assigned this Jul 30, 2026
The first pass recorded governor: powersave in every artifact, which
host-guard.ts warns about — the published numbers were taken in a state the
apparatus itself flags as untrustworthy. Fixed by setting the governor for
the run.

Two of the four tier demotions were governor artefacts and are now gone:
createRegistry and useProxyRegistry are back to blazing, both having sat
within a few percent of their edges. 14 of 16 badges are unchanged from the
GHA-measured series.

The two that remain are real. createDataGrid (Compute spans, 10,000 items:
39.5ms) and createFilter (Update query 10 times, 10,000 items: 39.3ms per
op) both exceed 33.4ms — two frames at 60fps — on this host. That threshold
is anchored to something a user can feel, unlike the per-item budgets, so
these are the demotions worth keeping.
The Performance Tiers section documented a scheme replaced in #539 on 7 July:
four ops/s buckets split by O(1)/O(n)/O(n2), a complexity-detection table
keyed on benchmark names, and a claim that group tiers are the average of
their benchmarks.

None of that is true. getTier grades cost, not throughput: collection
operations on per-item microseconds AND single-operation latency against
frame budgets, worst axis wins; one-shot calls on call latency alone against
their own budgets. getGroupTier takes the worst, never the average --
averaging is precisely what it exists to avoid, since one flattering
microbench would mask a slow path.

Replaces the four tier cards and the complexity table with the two budget
tables the code implements, and says which thresholds are anchored to
something real: 16.7ms is a frame at 60fps and 100ms is the perceptibility
threshold, while the per-item and per-call budgets are conventions.

Also drops 'pnpm metrics' from Running Benchmarks. It regenerates published
artifacts, which now happens only on the reference machine; a reader
following that instruction produces numbers CI will reject.
@johnleider
johnleider merged commit c41ea5f into master Jul 30, 2026
22 checks passed
@johnleider
johnleider deleted the chore/metrics-regen-archbox branch July 30, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant