Skip to content

Tooling: preserve exact moment bounds with a 15× faster integer kernel - #5543

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
fluorine:perf-exact-moment-search
Oct 25, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
fluorine:perf-exact-moment-search

Conversation

@fluorine

Copy link
Copy Markdown
Contributor

Change and mathematical scope

The selected #5413 moment engine spends most of its sampled pricing time reducing intermediate Fractions. This opt-in adapter computes the same forty-term Taylor sum and the same rational remainder with integer recurrences. Every output grid rounding, squaring, logarithm, reciprocal and downstream pricing function is retained. The package includes an algebraic equivalence proof and an authenticated copy of the frozen reference. No predecessor or selected result is edited; no new κ is claimed.

Three alternating fresh-subprocess pairs on Windows / CPython 3.12.2 give median 4.1874 → 0.2770 seconds (15.12×) for 24 actual invoice ranks × 12 distinct exponents, complete signed moments and strict allowances. All six complete mathematical receipts agree exactly. Both earlier and final timing samples are retained. This measures pricing, not complete caller replay speed.

Task and overlap

replay-runtime, scope refined to the user-requested current moment bottleneck. Canonical base refreshed at 32890bc. Source engine and invoice Git blobs and SHA256 are pinned in SOURCES.json; package-local snapshots make replay Git-free. Related PR672 and PR2552 already use integer exponential kernels. This adapts the classical technique to the current 72-log / 40-exp / 10^65-grid engine and selected invoice; it does not claim a new method.

Validation

python3.12 -B scripts/research_package.py --package research/current-moment-integer-fastpath passes normal and optimized commands locally. Checks compare complete rational outputs and all 600 exponential invocation/result records, 121 boundary/seeded arguments, exact unrounded Taylor/remainder parts, 35 signed-power cases and the selected lower/ceiling bracket. Actual degree, tail and inward-rounding mutants are detected, as are source/fixture tampering, an omitted paid call and invalid rank. Committed-byte preflight (13 files), official source export and bundle check pass. The snapshot retains one original trailing blank line, so its whitespace warning is inherited.

Rebenchmark with python3.12 -B research/current-moment-integer-fastpath/benchmark.py --pairs 3 --output /tmp/fresh-benchmark.json. No timing threshold is used in CI. Hosted Linux/Windows checks are pending. Full source-history preflight is not claimed from this shallow checkout. Full caller replay, whole-repository tests, physical/native/target/precision/compiler/outer admission, Lean and independent human review were not run for this adapter.

Credit

Chris R / Clear1nsight supplies the reference arithmetic and caller completion. Dillon, Ali Romman, Cao Yifan, Dugongue, Cinna Davis, zxv and the retained lineage supply the construction. PR672 and PR2552 supply related optimization precedents. New material by Joseph Anglada with substantial OpenAI Codex assistance, Apache-2.0.

Open next questions

The package README and TASK.json explain the smallest next steps: compare complete caller receipts through a separately reviewed adapter, and use the exact fast path on a changed fully charged physical word. Native validation may dominate full replay; faster arithmetic alone does not improve κ.

@fluorine

Copy link
Copy Markdown
Contributor Author

Verification update for unchanged head 18601a37ca61c93a75e527842d56c3a7495c842f: the registered package replay passed on both Linux and Windows, normal and optimized Python, in own-fork run 40176796139. Both job logs show this exact checkout SHA and the identical mathematical receipt hash fd2027763821b8623d579c37a7826a686d2725c0fdd18c193e59a64e481a98fd. This is separate from the upstream workflow awaiting maintainer approval.

The official export of the published head passes its bundle check. A separate Git-free export replay with empty PATH/PYTHONPATH passes both modes and leaves all 14 bundle files byte-unchanged. The 13-file committed-byte preflight also passes. Full source-history preflight and full caller timing remain unclaimed. No new κ.

@Mister-Meeseeks
Mister-Meeseeks merged commit d99b379 into CrocSwap:main Oct 25, 2026
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