Skip to content

Tooling: 3.12× faster inplace-side prefix replay with identical receipts - #1793

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
VictorLiwentao:cursor/inplace-side-prefix-fast-60b9
Oct 14, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
VictorLiwentao:cursor/inplace-side-prefix-fast-60b9

Conversation

@VictorLiwentao

Copy link
Copy Markdown
Contributor

Change and scope

At base 0b1cccf86e2f5132ed286a26ef0a681a495740ea, the historical inplace-side prefix checker (scripts/experiments/inplace_side.py:verify_prefix) rejects a specified n-role Gauss–Jordan side family using three pinned witnesses (h = 42, 46, 50). Each elimination column previously rebuilt sorted(unused) to locate the least unused row with the pivot bit set.

This PR replaces that search with a least-unused flag scan and column masks. The lexicographic pivot rule, XOR updates, switch witnesses, deficit arithmetic and every receipt field are unchanged. Only the source pin for scripts/experiments/inplace_side.py changes inside certificates/inplace-side.json.

Tooling improvement; no new kappa. The selected frontier, upstream/, and the mathematical rejection in docs/research/inplace-side.md are not reopened.

Result

On Linux / CPython 3.12.3, five alternating fresh-process pairs of the three pinned witnesses gave median 17.061 s → 5.466 s (3.12×). Timing is host-descriptive and is not a correctness gate. Receipts match the byte-identical baseline checker fieldwise; a greatest-unused mutant is rejected on all three witnesses.

Package: research/inplace-side-performance/.

Validation

Python 3.12, standard library only:

python3.12 -I -B research/inplace-side-performance/verify.py
python3.12 -I -O -B research/inplace-side-performance/verify.py
python3.12 -B scripts/research_package.py --package research/inplace-side-performance
python3.12 -I -B research/inplace-side-performance/benchmark.py --rounds 5

Expected:

PASS_INPLACE_SIDE_PREFIX_FAST witnesses=3 h=[42, 46, 50] paths=[151, 415, 767] ... no_new_kappa
PASS_REGISTERED_RESEARCH_PACKAGE research/inplace-side-performance outcome=completed
PASS_IDENTICAL_INPLACE_PREFIX_RECEIPTS

Default verify is read-only. Use --write-certificate only after editing the production source. Full make verify, selected cold replay, Lean, and multiplication-theorem obligations were not rerun for this isolated historical-checker change.

Overlap and credit

Closest priors (different objects): CrocSwap/integer-mult-bounds#756 packed balanced-Fano replay; CrocSwap/integer-mult-bounds#1584 finite-bit block-core frame interning; CrocSwap/integer-mult-bounds#1076 / CrocSwap/integer-mult-bounds#1075 quadratic tooling. No competing open PR on this inplace-side object at refresh.

Douglas R. Colkitt authored the inplace-side rejection, witnesses and original checker. Prepared by Wentao Li (VictorLiwentao, @Is__Victor) with substantial AI assistance, under Apache-2.0.

Replace per-column sorted(unused) pivot search in verify_prefix with a
least-unused flag scan and column masks. Preserve all witness receipts,
rejections and the inplace-side certificate except the production source pin.
@Mister-Meeseeks

Copy link
Copy Markdown
Contributor

Batch review at 7c16aea5074ae673e58bc38c8d99a948e3937853.

Merged to main, preserving the original contributor commits and package attribution.

Reviewed scope: Ascending pivot scan replaces repeated unused-column sorting without changing the deterministic side routine. Exact predecessor outputs and certificate regeneration agree; combined current-main tests pass. Author speedup ratio is not independently timed.

The pinned scoped command passed; the batch ledger contains its command, input hashes, environment and log. This incorporates the research/tooling contribution and does not change the selected κ or discharge the inherited multiplication-theorem assumptions.

Batch review, attribution and evidence. Thank you for the contribution.

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.

2 participants