Repository navigation
Reduce complete mapped-contact replay time by 72.54% (no new κ) - #6274
Merged
Mister-Meeseeks merged 1 commit intoOct 31, 2026
Merged
Conversation
This was referenced Oct 30, 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.
Summary
Scoped implementation-equivalence proof, finite conformance and local performance evidence. The complete PR4841 mapped-contact distance caller uses 72.54% less median wall time, with every check and output retained. No new kappa or selected-frontier change.
Rank-nullity proves equality with the literal actual-change computation. The independent retained prediction formula is unchanged. One bounded cache holds only the consecutive immutable contact. The original caller, inputs and expected receipt retain their bytes.
The implementation, proof and experiments were produced by Nick Petalas. Credit David Ganz / Dugongue's PR4841 for the geometric predicates, complete small checks and source graph, with Cao Yifan's PR4610 and Cinna Davis's PR4690/4672 lineage. Rank-nullity and binary elimination are classical; no predecessor mathematical result is claimed as new.
Evidence
Before: literal complete-caller median 8.198592292 s. After: rank complete-caller median 2.251555958 s. Five alternating fresh-process pairs, zero errors, all ten stdout SHA256 values
a4aa6158abcdd6faa82fc2a83e3978dffa0ee8cc2ae9cf6d2a70e00ebd280658.The untimed profile identifies the retained actual-change path as 16.799 of 18.866 profiled seconds, with 40,711,680 generator iterations. Timings include interpreter startup, input authentication, the complete small and graph phases, expected-receipt validation and output. Both engines use identical flags and inputs. CPython 3.12.15, macOS 27.0.1 arm64, 18 logical CPUs; observed pre-measurement load averages 3.66/2.51/1.80. This is a local measured reduction, not a portable speed guarantee or the runtime of the entire five-command PR4841 compiler package.
Replacement conformance passes on 1,170,036 Lagrangian pair/axis cases through width three, 19,600 cases over every binary two-plane, one equal-value cache replacement and 4,608 wider cases through width nine. Eleven invalid inputs, four actual changed-source controls, two incorrect-output controls and failed-cache preservation pass. The complete retained caller still checks 4,429 frames, 145 maps and all 79,360 actual sampled axes across the unchanged 1,240 contacts.
All checks below pass locally. Direct normal and optimized checks took 5.482 and 5.952 seconds; the registered two-command run took 12.658 seconds. Each is below its 180-second registered limit. Generated normal and optimized receipts agree. Committed bytes/modes and source ancestry pass for all thirteen package/input files. Official export integrity and all four declared inputs pass. Both modes pass from a read-only Git-free export with empty PATH; all fourteen exported files retain their bytes. Warning-strict execution, source compilation and AST inspection pass. Ruff and mypy are unavailable locally; no such pass is claimed.
Reproduce from the repository root:
Another host may substitute CPython 3.12. Scientific marker:
PASS_RANK_CONTACT_REPLAY; launcher marker:PASS_REGISTERED_RESEARCH_PACKAGE; publication marker:PASS_RESEARCH_COMMIT_BYTES. The standard library suffices. To remeasure, set TMPDIR to an existing scratch directory and run:/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/rank-contact-replay/benchmark.py --output "$TMPDIR/contact-benchmark.json"The generated report binds timings, successful complete work, environment and output hashes to package-file hashes. Generated receipts and logs stay outside the checkout. The benchmark has no CI timing threshold.
Limitations
Only the complete mapped-contact distance command is accelerated. The other four PR4841 commands, graph regeneration, native realization, new chart construction, physical hosting, precision/tape, supplier admission and outer funding were not run. No mathematical proof obligation was deferred to CI; the five framework assumptions remain. Independent human and formal proof-kernel review are unclaimed.
Open next questions
Can a validated basis-only contact interface remove complete-subspace materialization too? Start with a separate bounded input contract and measure the whole graph caller. It changes the source interface and remains outside this first-improvement contribution.
Related open work
The completion refresh inspected all thirteen open account PRs created since the advance CLAIM, including this PR. None of the twelve other contributions targets the PR4841 mapped-contact caller or computes its timings. No same-instance numerical disagreement was identified, and no additional scientific computations checked other submissions. Neighboring replay-engineering work has separate source objects:
No timing comparison is asserted across these different callers. Earlier live open-list and paginated overlap searches found no open PR on this exact replay. Sparse local coverage is incomplete and absence of matches is not a novelty guarantee. PR4841 is merged predecessor work.
CI notes
Both hosted checks passed at exact head
f6a192c2d22c0a3534ea7f01e31e45a8033e9191in run 41067428692: plan in 3m43s and replay (research/rank-contact-replay) in 1m49s. The completed check list was read once; separate run metadata confirms completed status, success and the matching head.All declared local checks and publication/export controls above also passed. Hosted replay certifies execution of the registered normal and optimized finite checks and source bindings. The local timing measurement remains outside the CI gate; independent human and formal proof-kernel acceptance are unclaimed.
Advance CLAIM.
Merge Danger
Door: two-way. Blast radius: isolated research package. Nine new files; shared code, frozen sources and the selected frontier are unchanged.