Skip to content

Tooling: 3.58× faster joint-frame product with identical receipts - #1922

Open
VictorLiwentao wants to merge 2 commits into
CrocSwap:mainfrom
VictorLiwentao:cursor/joint-frames-cleared-product-60b9
Open

VictorLiwentao wants to merge 2 commits into
CrocSwap:mainfrom
VictorLiwentao:cursor/joint-frames-cleared-product-60b9

Conversation

@VictorLiwentao

Copy link
Copy Markdown
Contributor

Change and scope

At base 0b1cccf86e2f5132ed286a26ef0a681a495740ea, the historical positive-side audit spends substantial time in scripts/audit_joint_frames.py:product, which multiplies rational matrices entrywise with many intermediate Fractions.

This PR clears denominators once per factor, multiplies with Python integers, and rebuilds canonical Fractions. The product is entrywise equivalent. Only the source pin for audit_joint_frames.py changes inside certificates/rank-product-core.json.

Tooling improvement; no new kappa. Selected frontier untouched.

Result

On Linux / CPython 3.12, five alternating fresh-process pairs of the positive-side stream gave median 26.143 → 7.302 s (3.58×). Timing is host-descriptive and is not a correctness gate. Positive-side experiment receipts stay fieldwise identical.

Package: research/joint-frames-cleared-product/.

Validation

python3.12 -I -B research/joint-frames-cleared-product/verify.py
python3.12 -I -O -B research/joint-frames-cleared-product/verify.py
python3.12 -B scripts/research_package.py --package research/joint-frames-cleared-product
python3.12 -I -B research/joint-frames-cleared-product/benchmark.py --rounds 5

Expected:

PASS_JOINT_FRAMES_CLEARED_PRODUCT positive_side_cases=12 random_cases=2500 certs=1 no_new_kappa
PASS_REGISTERED_RESEARCH_PACKAGE research/joint-frames-cleared-product outcome=completed
PASS_IDENTICAL_POSITIVE_SIDE_RECEIPTS

Default verify is read-only. 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, CrocSwap/integer-mult-bounds#1793, CrocSwap/integer-mult-bounds#1861, CrocSwap/integer-mult-bounds#1217. No competing open PR on cleared-denominator product at refresh.

Predecessor joint-frame / positive-side checker authors retain credit. Prepared by Wentao Li (VictorLiwentao, @Is__Victor) with substantial AI assistance, under Apache-2.0.

Clear denominators once per factor in audit_joint_frames.product, multiply
with Python integers, and rebuild canonical Fractions. Positive-side
experiment receipts stay fieldwise identical; only the rank-product
certificate pin for audit_joint_frames.py changes.
@Mister-Meeseeks

Copy link
Copy Markdown
Contributor

The scoped differential suite passes: 2,500 positive-shape products, the historical stream, source/certificate checks and 12 unit tests. I found one small legacy behavior regression before production integration: product(((),), ()) returns ((),) in the frozen baseline but raises IndexError at B[0] in this head; the two-row zero-width case behaves similarly. Please preserve this degenerate-shape case, add the regression test, refresh the production source pin/bound receipt and rerun the existing suite. This does not question the positive-shape arithmetic or the reported benchmark. Exact-head review and diagnostic: https://github.com/CrocSwap/integer-mult-bounds/blob/main/docs/research/community-efficient900-review.md

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