Skip to content

perf baseline: re-record the output digests against current main (digests only) - #668

Merged
GoKubar merged 1 commit into
mainfrom
perf/rerecord-digests
Sep 15, 2026
Merged

GoKubar merged 1 commit into
mainfrom
perf/rerecord-digests

Conversation

@GoKubar

@GoKubar GoKubar commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Re-records the output digests only in crates/perf-bench/baselines/linux-x86_64-ryzen7-7800x3d.json, on the reference host, at main 35ead1c2.

Why this is a main-level task

The output-identity check is a hard gate — "byte-identical output is a hard gate, so this fails regardless of timings". The committed digests predate #295/#296 and #649, so main itself fails the gate (run at ec3cb67c: FAIL: output changed in 20 place(s)), and every PR touching layout inherited a failure it did not cause. That is baseline debt, not any one PR's.

What changed, and only what changed

14 of 26 cases move, 116 digest values. 12 cases are byte-identical, including both synthetic documents and math-heavy/tikz-heavy.

meta, targets, every per-case metrics map and every load1_max are byte-identical to #206's capture, checked field by field:

meta identical: True
metrics identical: True
load1_max identical: True
only digests differ: True
case order preserved: True

The file keeps its original compact single-line JSON, so the diff is 1 insertion, 1 deletion rather than a reformat.

Attribution — measured, not asserted

I re-recorded a second time at 44b21adc (main immediately before #649) and diffed both ways, so each case's change lands in a commit range:

Cause Cases
pre-#649 — #295 (\ne paint position) and #296 (\not as a zero-width \mathrel) hw2, inline-math, math-sheet, ps-calculus, twelvept-plain
#649 — #611/#625/#628 list label and item-text offsets, #614 /ActualText cv, enumitem-worksheet, hyperref-toc, lab-report, lecture-notes, listings-manual, lmodern-report, plain-article, ps-calculus, thesis-chapter, twelvept-plain

One correction to the brief. The negated-relation set is five fixtures, not three. ps-calculus (\neq ×1, \not ×2) and twelvept-plain (\neq ×1) also moved before #649 — a \ne-only grep misses them because they use the \neq/\not spellings. #295/#296's blast radius was slightly wider than a \ne search suggests, and hw2's own hit is \ne\varnothing, which a \ne -with-space search also misses.

The changed set is exactly documents using itemize/description, or a negated relation, which is what the landed work predicts:

  • hw1 is unchanged and uses only enumerate (0 itemize) — the list work moved itemize markers and item-text offsets, not enumerate.
  • lecture-notes has no itemize and changed only cold.reply, export.pdf and the four v2 warm keys, never v1 — that is pdf: optional /ActualText groups so multi-glyph symbols extract as one character #614 grouping its \gcd/\lcm multi-glyph runs into /ActualText, a v2-and-PDF-only change.
  • letter, conf-paper, article-twocolumn, input-bibliography, natbib-review, siunitx-tables, unicode-accents have neither and are byte-identical.

Method, and its stated limitation

flashtex-perf-bench --runs 1 --warmup 0 --json fresh.json        # full 26-case corpus, at 35ead1c2

then a script that copies only each case's digests map into the committed baseline.

--runs 1 is safe for digests and I proved it rather than assuming: a control run at --runs 5 (CI's own setting) over hw1, math-sheet and plain-article reproduces the --runs 1 digests exactly. Fewer runs only thins the timing samples, which are discarded here.

Timings are deliberately not re-recorded, and could not usefully be. #206's baseline was captured in a local scratch worktree, and meta.font_config records that worktree's absolute paths. The harness compares that string to decide whether two runs are the same profile, so even a run on this same Ryzen machine is treated as a different host/profile — the verification gate below reports 85 timing regression(s) reported but not enforced: the baseline was recorded on a different host/profile. Re-recording timings here would therefore not make CI's timing comparison valid; CI runs on EPYC/Xeon runners and will keep reporting-not-enforcing regardless. Making timing comparisons meaningful needs a separate decision about where the reference capture lives, and is out of scope for this PR.

Verification

Full corpus at main with the new baseline:

== regression gate (tolerance 5.0%, 601 metrics compared) ==
85 timing regression(s) reported but not enforced: the baseline was recorded on a different host/profile
exit=0

No OUTPUT CHANGED, no FAIL, exit 0 — the digest gate passes on main again. CI's 13-case subset is a subset of what was re-recorded.

…ests only)

The output-identity gate is a hard fail, and main itself has been failing
it: the committed digests predate #295/#296 (negated relations) and #649
(list label and item-text geometry, /ActualText groups), so every PR
touching layout tripped a gate that main could not pass either.

Re-recorded on the reference host at main 35ead1c over the full 26-case
corpus. 14 cases move, 116 digest values in all; 12 are byte-identical,
including both synthetic documents and math-heavy/tikz-heavy.

ONLY the per-case `digests` maps change. `meta`, `targets`, every
per-case `metrics` map and `load1_max` are byte-identical to #206's
capture, verified field by field -- no timing number here is claimed to
have been measured on this host, and none has been replaced.

Attribution, by re-recording at 44b21ad (main immediately before #649)
and diffing both ways:

  pre-#649 (#295 \ne paint position, #296 \not as a zero-width
  \mathrel): hw2, inline-math, math-sheet, ps-calculus, twelvept-plain
  -- every corpus document containing \ne, \neq or \not, which is two
  more than a \ne-only grep finds.

  #649 (#611/#625/#628 list label and item-text offsets; #614
  /ActualText): cv, enumitem-worksheet, hyperref-toc, lab-report,
  lecture-notes, listings-manual, lmodern-report, plain-article,
  ps-calculus, thesis-chapter, twelvept-plain.

The changed set is exactly the documents using itemize/description or a
negated relation. hw1 is unchanged and uses only enumerate, which the
list work did not move; lecture-notes changed only its export.pdf and v2
keys, from #614 grouping the \gcd/\lcm multi-glyph runs.

Digests are independent of --runs: a control at --runs 5 (CI's setting)
over hw1, math-sheet and plain-article reproduces the --runs 1 digests
exactly.

Gate after the re-record, at main, full corpus: 601 metrics compared, no
digest change, exit 0.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Xd5Hmwh5GHNTiAmHUJ1MZu
@GoKubar

GoKubar commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

CI confirms it: engine performance now passes. (run)

No OUTPUT CHANGED, no FAIL: output changed in N place(s) — the first green perf run on a layout-affecting tree since the gate landed. The log's only gate line is the expected one:

239 timing regression(s) reported but not enforced: the baseline was recorded on a different host/profile

which is exactly the limitation this PR documents rather than papers over: the runner is an EPYC/Xeon, #206's capture was a local Ryzen worktree, and meta.font_config pins that worktree's absolute paths, so the harness declines to enforce timings. That stays true after this PR, by design — the digests are what was stale, and the digests are what was re-recorded.

Also worth noting for the record: 239 unenforced timing deltas here versus 85 in my local run against the same baseline, on the same file. That spread is between two runs of the same unchanged timings, which is its own evidence that the timing half of this baseline is not currently comparable to anything. Whoever picks that up next needs a decision on where the reference capture lives, not a re-record.

@GoKubar
GoKubar merged commit d635093 into main Sep 15, 2026
21 of 22 checks passed
@GoKubar
GoKubar deleted the perf/rerecord-digests branch September 16, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant