Repository navigation
A candidate already registered is not registered again: SimplifyHard -64% allocation - #1207
Merged
Merged
Conversation
…-64% allocation After #1205 a SimplifyHard level was still 431 MB of candidate registration, and the same temporary hook, split by stage, said why: at level 4 there were 363 registrations of which 298 were repeats. A pass that changes nothing registers the same tree again, and each registration is a CanonicalOrder rewrite -- the Sort rules, 2.4 MB a time on this input -- and an inner simplification before the history set declines the repeat. 874 MB of sorting and 718 MB of simplifying to add nothing. Alternate keeps a set of what it has registered and AddHistory returns at once for a tree already in it. The same tree registers the same way -- the rewrite and the rating are deterministic -- so the set of candidates is what it was, and the answer with it. Measured by the inter-version benchmark on the same machine as this morning's 1930th column and this afternoon's 1931st, against the 1931st: SimplifyHard 2,027,771,744 -> 733,188,536 bytes -63.8% 924 ms -> 371 ms SolveHard 1,057,996,016 -> 859,268,416 bytes -18.8% 772 ms -> 700 ms SolveMediumHard 126,162,152 -> 94,415,256 bytes -25.2% 78 ms -> 67 ms SimplifyEasy 115,763 -> 116,291 bytes +0.5% 89 us -> 71 us Since this morning's 1930th column, SimplifyHard is -80%, SolveHard -41% and SolveMediumHard -43%. SimplifyEasy's 528 bytes more are the set itself, which on a fifteen-node input has nothing to save. Every other row is unchanged. The suite holds every pinned Simplify answer and the corpus gate. The gate's baseline is updated in the same change, for the reason its document gives for a drop. Part of #746. Full suite 9610 passed, 0 failed. Two tests re-pinned: they asserted the raw recording is twenty times the derivation path and over a hundred steps, ratios calibrated to the re-sorting this removes; it is 63 against 4 now and they say so. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
This was referenced Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The second registration lever, found by the same temporary hook as #1205, split by stage this time.
What the split showed
At level 4 on
SimplifyHard: 363 registrations, 298 of them repeats — a pass that changesnothing registers the same tree again. Each registration is a
CanonicalOrderrewrite (theSortrules, ~2.4 MB a time on this input) and an inner simplification before the history set declines
the repeat: 874 MB of sorting and 718 MB of simplifying to add nothing. The ratings were already
cheap (294 KB in all) after #1205's cost cache.
What changes
Alternatekeeps a set of what it has registered andAddHistoryreturns at once for a treealready in it. Same tree, same registration — the rewrite and the rating are deterministic — so
the set of candidates is unchanged, and the answer with it.
Measured
Same machine as this morning's 1930th column and this afternoon's 1931st (#1205):
SimplifyHardSolveHardSolveMediumHardSimplifyEasySince this morning's 1930th column:
SimplifyHard−80%,SolveHard−41%,SolveMediumHard−43%.SimplifyEasy's 528 bytes more are the set itself, which on a fifteen-node input has nothing tosave; every other row is unchanged. Timings carry the performance file's usual rider.
The gate's baseline is updated in the same change, for the reason its document gives for a drop.
Every pinned
Simplifyanswer and the corpus gate hold.Part of #746.
Checks
Full suite 9610 passed, 0 failed, 14 skipped. Two tests re-pinned rather than loosened:
ThePathIsASmallPartOfWhatHappenedandTheDerivationIsFarShorterThanTheRawRecordingasserted the raw recording is 20× the path and over 100 steps — ratios calibrated to the re-sorting this removes; it is 63 against 4 now (15×), and the claim they make is the same.🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura