Skip to content

Reduce complete native-history replay time by 23.67% (no κ) - #6301

Open
petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w9-1030c-clean-helper-obstruction
Open

petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w9-1030c-clean-helper-obstruction

Conversation

@petalas

@petalas petalas commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The complete PR5447 direct-history caller takes 23.67% less local wall time by reusing exact native-map setup across its three cases. Five alternating fresh-process pairs give medians 1.279605 s and 0.976726 s, with zero errors and byte-identical scientific output. Claim type: scoped implementation-preservation proof with finite conformance and local performance evidence. No new kernel theorem, kappa or supplier admission.

complete original caller
  three independent native registries
    216 native-map requests
      58 exact immutable constructions + 158 cache hits
  every original history equation and rejection control
  unchanged complete scientific output

The cache snapshots all nine binary columns, holds at most 256 immutable results, retains original singular-map failures, and clears on invocation exit. Frozen predecessor code is authenticated and executed unchanged. The first improvement is shipped without further optimization.

The adapter, proof, checks and measurements were produced by Nick Petalas. Credit THU New Media Research Center / thu-nmrc PR5447, Mark / Matarener PR5427, Dillon Amburgey PR5402, Cao Yifan PR4610, Cinna Davis, zxv, David Ganz, Jacob Alan Sussman, Ali Romman and the retained native/query/compiler lineage. Memoization is classical. Exact source pins and full retained credit are in the package.

Advance CLAIM. Base is canonical main 2485805a6d47f36ea83ddde6327d453ac82d44dc, priority revision 8, card replay-runtime, refined to this newly posed implementation question. Selected binding orientation passes at conditional kappa .003125804. Live handoffs, claims, open PRs, account history, main quantity/object searches and merged work were checked before reservation and refreshed before publication. Sparse notes, historical diffs and unpublished work remain outside complete coverage.

Evidence

Before, the full caller constructs the same native maps repeatedly. After, all original three-case scientific output bytes agree, with 158 of 216 constructions avoided.

  • Five runs per side alternate baseline/cached in fresh CPython 3.12.15 processes on macOS arm64. Baseline range 1.246776 to 1.304742 s; cached range 0.961030 to 1.042614 s. All ten processes succeed. The generated BENCHMARK.json binds the implementation, harness and source manifest. Complete subprocess startup, authentication and all scientific work are timed. Timing is local evidence, not a CI gate.
  • Complete profiles locate repeated deterministic construction. The cached profile retains the original rational row arithmetic, which remains a larger cost. No scientific work or check is removed.
  • Normal and optimized direct checks pass 300 exact nine-dimensional map comparisons, mutable-key, eviction, capacity and lifetime checks, eight rejecting executions and both complete caller modes. Every field of the original result is retained. The original four semantic controls still run.
  • Both registered commands pass in 6.76 s total locally. Separate direct normal/optimized commands take 3.44/3.56 s, below their 120-second limits.
  • Committed bytes, executable modes and declared source history pass for all 15 package/input files. Official export integrity and all seven declared inputs pass. Normal and optimized replay pass from a read-only Git-free export with empty PATH; all 16 exported files retain bytes and modes.
  • Separate actual corruption controls reject each of the seven external inputs and a constant cache key in both modes: sixteen rejecting executions. Those export mutation controls are local evidence; the registered CI pair covers the package verifier.

From the repository root with the standard library:

/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -B research/native-history-setup-cache/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -O -B research/native-history-setup-cache/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/native-history-setup-cache
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/native-history-setup-cache --check-source-history --check-modes
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -B research/native-history-setup-cache/benchmark.py --output /absolute/scratch/new-benchmark.json

Expected markers: PASS_NATIVE_HISTORY_SETUP_CACHE, PASS_REGISTERED_RESEARCH_PACKAGE, PASS_RESEARCH_COMMIT_BYTES. Another CPython 3.12 executable may replace the local path. The benchmark output must be a new external file.

Limitations and unrun obligations

Only this complete direct caller is accelerated. Other PR5447 commands, selected cold replay, native supplier admission, physical caller, compiler closure, ownership, precision/tape and analytic recovery remain unrun or inherited. All five selected framework assumptions remain. No local registered command is left for CI to run for the first time. Independent human and formal proof-kernel review are unclaimed.

The cache adds bounded memory, at most 256 times 1,024 bytes of retained payload plus keys and bookkeeping. Python allocation and pinned dynamic module loading are documented code-discipline deviations. Warning-strict normal/optimized execution supplies the available diagnostics; no external static analyzer was available.

Open next questions

Can exact rational row arithmetic reduce the remaining complete caller cost without changing scientific output? First profile the cached complete path. A shared invocation-owned operator factory is another possible integration question; its key, lifetime, invalidation and other caller checks need an explicit contract. Neither follow-on is reserved or implemented here.

Related open work

No other inspected open PR targets this complete PR5447 direct-history caller or its setup runtime.

  • PR6293 studies selected MOVE tensor phases. This cache preserves complete signed operator bytes and changes no phase convention; it uses a different historical caller.
  • PR6298 proves a scalar-frame phase-gauge obstruction for the selected word. Its phase criterion and this runtime quantity differ; neither result is used to validate the other.

The completion refresh inspected all 16 open account PRs created since the CLAIM, including this PR. None of the other fifteen studies this complete PR5447 caller setup or computes its runtime. No same-instance numerical disagreement was identified. No additional computation compared another contribution's reported number.

CI notes

Both hosted checks passed at exact head e95cabb81aea8fc09bfa62e3188a93bcd6b79b7c in run 41106545148: plan in 4m36s and replay (research/native-history-setup-cache) in 1m38s. The completed check list was read once; separate run metadata confirms completed status, success and the matching head.

All declared local checks and publication/export checks above also passed. Hosted replay certifies execution of the registered automated checks and source bindings within their stated scope. It does not certify a portable timing improvement, a new mathematical kernel theorem or supplier admission. Independent human and formal proof-kernel review remain unclaimed. No CI failure remains to report.

Merge Danger

Door: two-way. Blast radius: isolated research package. Eight additive files; no shared implementation, frozen evidence, predecessor credit or selected-frontier record 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