Repository navigation
Tooling: 2.25× faster mixed-point scalar digests with identical receipts - #1984
Mister-Meeseeks merged 2 commits into
Conversation
Replace per-node json.dumps in audit_mixed_point.scalar_check with a byte-identical hand-rolled line writer. Preserve circuit_sha256, support checks and mixed-point/early-sharing mathematical payloads.
Five alternating fresh-process pairs on CPython 3.12.3 / Linux give median 10.004 → 4.444 seconds with fieldwise-identical scalar receipts. Cap package command timeouts under the 1200s generic replay budget.
|
Batch review at Merged to Reviewed scope: Shared-point scalar digest optimization preserves canonical bytes for the complete declared scalar and encoding fixtures against the pinned prior implementation. Assertion-enabled replay, optimized replay and regression tests pass. Author timing ratios are not independently benchmarked; no mathematical claim. 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. |
Change and scope
At base
0b1cccf86e2f5132ed286a26ef0a681a495740ea, the historical mixed-point audit (scripts/audit_mixed_point.py) and the early-sharing screen both callscalar_checkon large cancellation-free circuits. Profiling shows a large share of that helper’s time in per-nodejson.dumps((node, args), …)and per-outputjson.dumps((i, node), …)while buildingcircuit_sha256.This PR writes the same UTF-8 digest lines with an equivalent hand-rolled formatter (
[node,null],[node,[a,b]],[i,node]), keeps every support and topologyrequire, and leavescircuit_sha256unchanged. No certificatesource_sha256pin listsaudit_mixed_point.py; the mixed-point and early-sharing mathematical payloads stay fieldwise identical to the committed files.Tooling improvement; no new kappa. Selected frontier untouched.
Result
On Linux / CPython 3.12.3 (Linux-6.12.94+-x86_64-with-glibc2.39), five alternating fresh-process pairs timing only
scalar_checkon the fixed mixed-point circuit set gave median wall time 10.004 → 4.444 seconds (2.25×). Timing is host-descriptive and is not a correctness gate. Every scalar receipt matches the baseline checker fieldwise (roles,circuit_sha256, flags).Package:
research/mixed-point-scalar-digest/.Validation
Expected:
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#1922, CrocSwap/integer-mult-bounds#1217, and
research/rational-containment-performance/(mixed-pointcontainedadapter). Open CrocSwap/integer-mult-bounds#1874 optimizes a different hosted-audit digest path and does not touchscalar_check. No competing open PR on thescalar_checkdigest object at refresh.Douglas R. Colkitt authored the mixed-point and early-sharing screens and original checkers. Prepared by Wentao Li (VictorLiwentao, @Is__Victor) with substantial AI assistance, under Apache-2.0.