Repository navigation
perf(groebner): use additive monomial hashes - #11045
Merged
Merged
Conversation
Two adjacent AB/BA campaigns (the first inconclusive, then the single permitted unchanged repeat) against the frozen main build. All 128 pairs have identical bases and counters other than the charged work. The report is recomputed from the retained capsule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kim-em
marked this pull request as ready for review
November 9, 2026 11:07
13 tasks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kim-em
enabled auto-merge (squash)
November 9, 2026 11:27
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.
This PR replaces the FNV monomial hash with an additive hash: each coordinate has a fixed 64-bit weight and a monomial's hash is the weighted sum of its exponents. Product degrees, support masks and full-width hashes then combine from the two factors' cached metadata instead of being recomputed coordinate by coordinate, in both the portable
MonomialTablepath and the bounded native product batches. Hashes only select collision chains; every successful lookup still compares all exponents, so monomial identity, outputs and the reference/native equivalence are unchanged. Reduced-width hash tables keep their full prepared workspace hash.Charged work changes only where collision-chain visits change, so the F4 conformance fixture's statistics are regenerated. All HexGroebner conformance modules build, the emitted F4 fixture matches the committed one, and its 567 reduced bases match SymPy 1.14.0 and Singular 4.4.1.
On the first-size selection (all ten families in three fields plus Eco-14/Eco-15 over F₂), frozen adjacent AB/BA campaigns against the main build, with
MIMALLOC_ALLOW_THP=0in both arms, give candidate/process ratios of 0.9991/0.9632 in the first campaign, which is inconclusive, and 0.9338/0.9450 in the one permitted unchanged repeat. Pooled, they are 0.9659/0.9541. All 128 pairs have identical complete bases and identical counters other thanwork. This supports a modest improvement only.reports/bench-results/hexgroebner-additive-hash.mdis recomputed byscripts/bench/groebner_additive_report.pyfrom the retained capsulef4-additive-02a5eb690462.Continues #10987.
🤖 Prepared with Claude Code