Skip to content

Reduce complete member-bank census time by 9.78% (no κ) - #6414

Open
petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w11-1102b-clean-ancilla-rank
Open

petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w11-1102b-clean-ancilla-rank

Conversation

@petalas

@petalas petalas commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A bounded cache reduces the complete PR6396 independent member-bank census command from a local median 4.2855 s to 3.8666 s, 9.78%, across five alternating fresh-process pairs. Every pair improves. Claim type: scoped implementation-equivalence proof, exact finite conformance and a local performance observation. No new kappa or selected-frontier change.

contains(outer, inner)
  look up the complete ordered immutable space pair
  return its previously computed Boolean when present
  otherwise evaluate the unchanged exact predicate
  retain the result while the bounded table has room

Only research/g20-member-bank-cache/ is added. The seventeen required source files from ToikY's PR6396 at 2a5bc94df6d741b49afbadd36d96eb2aea0f6f1f are retained byte-for-byte, including notices. The private adapter changes one pure function binding. The census class, complete domain, direct checks, scientific receipt and receipt comparison stay unchanged. The source's mathematics is a cited premise, not an audit deliverable.

Evidence

  • Before: the source profile spends 3.363 of 12.013 profiled seconds in rational containment. The unprofiled complete command ranges from 4.1155 to 4.8022 s.
    After: the cache avoids 11,194 of 14,788 exact predicate evaluations and holds 3,594 of its allowed 32,768 entries. The complete command ranges from 3.6853 to 4.1152 s. All ten timed processes have the exact source success output, empty stderr and zero exit status. The timer includes startup, all current census work, input checks, complete receipt comparison, output capture and exit. These shared-host macOS observations do not establish cross-host performance.
  • Normal and optimized warning-strict replay pass 432 directional containment comparisons, capacity-exhaustion cases and six rejecting controls. Both reconstruct the complete scientific object with digest b3efbc891a7bd4b0303d61bcdf39bcffe1f3e951e0bd2dfed5ea2c24bbac92f4.
  • Two Git-free, empty-PATH, read-only CLI replays preserve their input inventories. Three actual CLI controls reject changed frozen bytes, a changed manifest and omitted cache installation. Both wrong-result in-process implementation mutants reject.
  • Local registered replay passes. The three individual checks took 3.835 s, 3.570 s and 11.051 s, below their 120/120/180-second limits. Warning-strict compilation passes. Committed bytes, executable modes and declared source ancestry pass for all thirty package files. All seventeen staged source blobs and modes equal the public source tree, including preserved CRLF bytes.
  • Official package export and input coverage checks pass. The committed export also passes a Git-free read-only scientific replay. BENCHMARK.json binds the measured code and includes every pair; PROFILE.json is a separate profiled run. The new verifier emits its own hash-bound receipt.

Exact reproduction from the repository root:

/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/g20-member-bank-cache/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -O -W error -B research/g20-member-bank-cache/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/g20-member-bank-cache/test_controls.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/g20-member-bank-cache
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/g20-member-bank-cache --check-source-history --check-modes

Use an existing CPython 3.12 path elsewhere. Put temporary outputs outside the checkout with TMPDIR when appropriate. replay.py runs the faster complete caller; benchmark.py --pairs 5 emits a fresh timing receipt to stdout. The expected registered marker is PASS_REGISTERED_RESEARCH_PACKAGE.

Limitations

Equivalence assumes the pinned caller's immutable canonical rational spaces and pure containment predicate. Cache exhaustion falls back to the original function. This changes no default source implementation, physical word, target, paid invoice, native operation, owned erasure, compiler or ordinary/outer admission. All five framework assumptions remain.

The other PR6396 registered commands, the selected supplier cold replay, Lean and Docker are outside this cost result and were not run. Independent human and formal proof-kernel review are unclaimed. The written proof records bounded allocation and fixed dynamic-loading deviations. The pending source is retained in this committed export; its public origin is bound in FROZEN.json. The generic ancestry check separately covers the declared main-branch provenance pins.

Open next questions

Should a future version of the original census adopt this bounded cache? Start from one exact new source head and its immutable-input/pure-predicate contract, then preserve its complete receipt and failure controls. Changed source contracts and adoption are outside this isolated result. Further optimization is unreserved.

Related open work

The completion refresh inspected eleven other account open PRs created since the advance CLAIM. No newly found PR studies this same member-bank census or containment-cache quantity, and no same-instance numerical disagreement was identified within that coverage.

CI notes

Both hosted checks, plan and replay (research/g20-member-bank-cache), passed at head 7bc62998ba3fc9f15f6f455d41d923d1ca3945be in run 41529262678. The completed checks were read once; run metadata confirms successful completion and the matching commit. All declared checks also passed locally. Hosted replay covers the registered finite checks and source bindings. It does not certify the local timing percentage or independent scientific acceptance. The benchmark has no registered CI timing assertion.

Credit

This contribution was produced by Nick Petalas. Credit ToikY for PR6396's census, separate oracle and coverage contract; Ali Romman for PR5679/5708; unpaidmoon for the bank-gap handoff; Nick Petalas for PR5983/5609; and Dugongue, ai-nanachi, compact436, Cinna Davis, DreamingOfClouds, eumemic, rohanarun, zxv, Jacob Alan Sussman and the full retained lineage. Frozen source credit stays unchanged. Memoization is classical; the new contribution is this bounded adapter, its equivalence and controls, and its complete-command measurement. Apache-2.0.

Merge Danger

Door: two-way. One isolated opt-in package.

Blast Radius: research. No shared code or selected result changes.

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.

1 participant