Skip to content

Reduce complete relative-tariff replay time by 29.42% (no κ) - #6421

Open
petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w2-1102c-original-step
Open

petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w2-1102c-original-step

Conversation

@petalas

@petalas petalas commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

An exact integer Horner backend reduces the complete frozen PR6378 primary relative-tariff replay's median wall time by 29.42%, from 49.18 ms to 34.71 ms, while preserving both rational interval endpoints, the complete result bytes and every original CLI check.

same frozen source + same complete CLI
original: per-term Fraction Taylor sum
integer:  integer Horner recurrence + identical rational tail
result:   identical 5805-byte retained certificate

Claim type: scoped exact-arithmetic preservation proof and measured verifier-engineering improvement, with finite corroboration. This contribution is produced by Nick Petalas. ToikY retains the scientific theorem, primary verifier and independent oracle; DreamingOfClouds, Ali Romman and the full retained NOTICE keep their construction/caller/native credit. Classical Horner and Taylor methods are not claimed as new.

Only research/relative-tariff-integer-exp/ is added. Sixteen exact predecessor files are retained at PR6378 head 4cfe905d84f3720c23a7f155f615222401953f95, including the original NOTICE. The adapter modifies one private function binding. No shared source or selected frontier changes.

Evidence

  • Before: nine alternating fresh-process samples have median 49.178584 ms, range 48.438583 to 52.462125 ms. After: median 34.710583 ms, range 34.038625 to 36.006292 ms. All eighteen measured commands and two warmups succeed. Both arms include the same adapter/source-authentication overhead and execute the original complete CLI, including the typed and byte-exact result comparison. Generated BENCHMARK.json binds twenty source/measurement inputs. This is one recorded host and command, not a universal or all-command speed claim.
  • A separate profile identifies 72 exponential evaluations as the limiter, 25.4 ms of the 43.6 ms instrumented source run. Their 1728 per-term rational iterations become integer arithmetic. Profiling is excluded from the benchmark. Both arms retain the same degree, grids, source fixture and existing logarithm cache.
  • The written proof preserves the finite Taylor polynomial and its exact geometric tail for every rational 0<=x<=1/4 and degree n>=1. The bounded implementation accepts Fraction components up to 4096 bits and degrees 1..64; the actual source uses degree 24 and denominators up to 171 bits.
  • Local CPython 3.12.15/macOS arm64 normal and optimized replay pass: 1449 exact direct-power/factorial cases, every reached source argument, complete result equality, both complete CLIs, 14 negative controls and all 3 inherited scientific rejection controls. Each registered check takes about 0.30 seconds locally.
  • Registered package metadata/replay, syntax parsing, whitespace checks and exact committed-byte/source-history preflight pass at 968c7cbf16dc74459dbe836401f7469b61474b52. All sixteen retained files match the generated origins manifest. No unmerged Git object or network access is required by the replay.

From the repository root, with the standard library:

/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -B research/relative-tariff-integer-exp/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -I -W error -O -B research/relative-tariff-integer-exp/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/relative-tariff-integer-exp
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/relative-tariff-integer-exp --check-source-history

Expected markers: PASS_RELATIVE_TARIFF_INTEGER_EXP, PASS_REGISTERED_RESEARCH_PACKAGE, PASS_RESEARCH_COMMIT_BYTES. Another CPython 3.12 executable can replace the local interpreter path. A fresh benchmark uses benchmark.py --pairs 9 --output /tmp/relative-tariff-timings.json, with the same interpreter flags and an unoccupied output path.

Limitations

The predecessor tariff theorem is a cited premise, not an audit deliverable. This accelerates one complete primary command; predecessor profile producers and the independent tariff oracle are authenticated where the primary authenticates them but are not executed or accelerated here. No new root, kappa, native/caller/supplier admission, complete multiplication theorem or selected-frontier change is claimed. The five framework assumptions remain. No independent human or formal proof-kernel review is claimed. Lean, Docker, physical integration and the selected cold replay are unrun.

Open next questions

  • Does this exact kernel improve another actual source-bound caller? Start by profiling that complete command and binding its exact interval contract. No other caller is covered here.
  • Should a future primary relative-tariff verifier adopt it? Bind that exact new source head and retain its complete receipt and rejection checks; shared adoption and changed-head applicability remain separate decisions.

Related open work

Refreshed this account's fifteen open PRs created since the advance CLAIM. None adds work on the same frozen PR6378 primary relative-tariff command or computes a conflicting result for it.

Advance CLAIM. Live claims, open/account PRs, local reservations and main/merged object and formula searches were checked before claiming and committing. Sparse local notes and unpublished work remain coverage limits.

CI notes

Both plan and replay (research/relative-tariff-integer-exp) passed at commit 968c7cbf16dc74459dbe836401f7469b61474b52 in run 41536234280. The registered normal and optimized conformance checks are now hosted-CI certified. Local metadata, direct replay, timings and committed-byte/source-history checks also passed.

Hosted replay checks exact conformance and source/timing-receipt bindings. It does not certify the local speed percentage as a cross-host threshold, the written proof through a formal kernel, or supplier admission.

Merge Danger

Door: two-way

Adds one isolated opt-in research package.

Blast Radius: research

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