Repository navigation
Tooling: 2.07× faster shared-point verify digests with identical receipts - #1994
Mister-Meeseeks merged 2 commits into
Conversation
Replace per-node json.dumps in SharedPointCircuit.verify with byte-identical hand-rolled digest lines. Package research/shared-point-digest/ with baseline foil, equivalence controls and registered replay. No new kappa.
Five alternating fresh-process pairs on CPython 3.12.3 / Linux give median 2.212 → 1.070 seconds with fieldwise-identical SharedPointCircuit.verify receipts.
|
Batch review at Merged to Reviewed scope: Common-centre scalar digest optimization reproduces prior canonical digest/payloads across five ground sizes and complete encoding regression cases. Checks run with assertions enabled and optimized. Applies to valid constructed leaves; no frontier change or independently certified benchmark ratio. 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. |
…p#1994 verify Keep hand-rolled verify digests from CrocSwap#1994 and add the merge/lookup construction speedup with identical DAG and circuit_sha256. Refresh package pins and benchmark receipts (median 0.649 → 0.438 s, 1.48×). Prepared by Wentao Li with substantial AI assistance.
Change and scope
At base
0b1cccf86e2f5132ed286a26ef0a681a495740ea,SharedPointCircuit.verifybuildscircuit_sha256with per-active-node and per-partial-outputjson.dumps(..., separators=(',',':'))updates. Profiling on the historical full-size circuit (h=46) shows about half of verify wall time in that JSON encoder path. Open CrocSwap/integer-mult-bounds#1984 left this object as an explicit next question after shipping mixed-pointscalar_checkdigests.This PR writes the same UTF-8 digest lines with an equivalent hand-rolled formatter (
[node,null,null],[node,[a,b],[common,local]],[common,[t0,t1,t2],node]), keeps every support and topology assertion, and leavescircuit_sha256unchanged. The bit-compression certificate does not listscripts/shared_point_circuit.pyinsource_sha256.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
SharedPointCircuit(46).verify(construction excluded; nestedExclusionCircuit.verifyincluded) gave median wall time 2.212 → 1.070 seconds (2.07×). Timing is host-descriptive and is not a correctness gate. Every verify receipt matches the baseline checker fieldwise (roles,additions,merged_additions,circuit_sha256, flags).Package:
research/shared-point-digest/.Validation
Expected:
Default verify is read-only. Historical support checks use
assertand are stripped under-O;circuit_sha256identity remains the gate. Fullmake 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#1984 (mixed-point
scalar_check; this package answers its SharedPoint open question), CrocSwap/integer-mult-bounds#1874. No competing open PR on theSharedPointCircuit.verifydigest object at refresh.Douglas R. Colkitt authored the shared-point / exclusion circuits and bit-compression screens. Prepared by Wentao Li (VictorLiwentao, @Is__Victor) with substantial AI assistance, under Apache-2.0.