Repository navigation
Reuse literal gate setup: 25.9% less qualification time, full coverage - #5832
Merged
Mister-Meeseeks merged 4 commits intoOct 27, 2026
Merged
Mister-Meeseeks merged 4 commits into
Mister-Meeseeks merged 4 commits into
Conversation
(cherry picked from commit ba8a9e6)
Contributor
Author
|
HANDOFF — exact literal-gate setup reuse after PR #5818; local qualification and exact-head hosted CI complete.
|
This was referenced Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change and mathematical scope
Reuse exact P-gate address tables and D-gate phase tables inside one dense literal interpreter during the complete frozen PR #5818 qualification. The self-contained normal package passes in 209.93 seconds wall / 209.20 CPU, versus the fresh PR #5818 baseline's 283.32 / 282.47, saving 25.91% wall and 25.94% CPU. The initial unprofiled prototype pair saved 26.61% / 26.57%. These use the same single baseline; they are not two independent pairs, a median or a universal performance claim.
Both literal arithmetic implementations still execute all 17,651 actual states and 9,037,312 amplitude entries per interpreter, including zeros, signed Gaussian values, absolute phases and denominators. Every original source/native/caller/invoice/compiler/outer check, adapter/omission control and complete RESULT/CROSS comparison remains active. No state vector, accepted result or sampled subset replaces a check. The original scientific stdout is byte-identical.
Setup tables are computed only with the dense interpreter's own unchanged pure helpers. The second sparse interpreter and quadratic engine share no new setup cache with it. Complete typed immutable width/gate keys, a 512-table LRU bound, source-method SHA256 and four required AST sites bind the replacement. At most 512 integer entries occur per table; key storage is additional. Eviction recomputes, exceptions are not cached and returned state vectors remain fresh.
The inherited single-process source-sharing boundary from PR #5818 remains: this is not a second cold source execution. Five framework assumptions, conditional kappa and selected metadata remain unchanged.
Task and overlap
Explicit donor assignment, refined
replay-runtime, frozen PR #5818 heada0171b8d2f942cdfc5295307548fe484c570b1ba, retaining original PR #575753006fe6031dab5c23d5b7d1cf6a92f411a04a68. The bounded claim precedes execution. Canonical main was refreshed before work and submission and remainsde5ec2e7a6074068452f45b1a191b5c72832df4a, priority revision 8. Bounded targeted PR/body, exact source comments and relevant Discussion checks found no matching follow-up. Exhaustive historical, unpublished and private-work coverage is not claimed.Profiling came before construction. Whole-circuit tableau reuse was rejected: 17,651 distinct keys, zero repeats, only 7.222 seconds of setup work. Dense literal work was the measured 117.684-second bottleneck. The scoped alternative reuses exact scalar P/D setup; it does not share oracle answers. The initial candidate records 61,214 hits / 23,983 misses with 512 resident tables.
The isolated package is
research/literal-gate-setup-reuse/. Its complete official 45-file predecessor export is retained at ancestoraa49178b0b16cf61ddacfd487226b77baa62d708; an unmerged predecessor Git object is not a runtime dependency. Frozen source packages and expected scientific receipts are unchanged. The branch also carries Ali Romman's exact test-only PR #5761 repair, sourceba8a9e640e1983f3c29993fefa3f46e8ed03313a, retaining original authorship/cherry-pick credit as PR #5818 already does.Validation
Before full construction, exact finite conformance compares the unchanged dense method with the derived method on 1,522 complete states / 22,700 amplitudes, including four width-nine cases. The final suite has 23 boundary/invalidation/capacity/eviction/exception/mutation/source controls, including corrupt P-address and D-absolute-phase detection. All 13 predecessor orchestration controls and seven source-custody controls remain, plus top-level retained-bundle byte corruption rejection before imports. Small suites pass normally and under
-O.The full normal package passes in 209.93 seconds; deliberate optimized mode passes in 214.55 seconds, with the same complete scientific stdout and no stderr, source mutation or resource stop. Kernel peak RSS is 519.03 MiB for the baseline, 521.11 MiB for the prototype and 522.85 MiB for packaged normal. Sampling and kernel peak measurements are reported separately. Shared host load, sequential order and unflushed OS caches limit timing conclusions.
This runs small controls followed by a fresh full scientific qualification, about 3.5 minutes on this Linux host. The README supplies an opt-in fresh baseline/candidate comparison, guarded serially with 600 seconds per command, 900 seconds for the first pair, 1 GiB sampled group RSS, bounded output and no retries; at least 15% wall and CPU savings are mandatory before separately gated optimized qualification. The local development round additionally counts its profiler and all later full qualifications toward a 1,500-second cumulative ceiling.
Publication head is
d2012c1e58cf25825e9a004a80545aefec631886; all 51 committed package files/bytes/modes, immediate input-pin ancestry and official export/input integrity pass. The implementation export ise55f42805ce373f9b680a9a2406a035b29e88b15. The read-only, Git-free implementation export passes under-I -O -B, empty PATH and an explicit authenticated import root in 213.97 seconds, with all 42 exported files unchanged. All six local scientific commands pass in 1,408.80 seconds total, including the profiler, within the declared cumulative ceiling. Complete committed-byte/mode and input checks are recorded in VALIDATION.json and the canonical handoff. Later additions contain evidence/reporting only; the qualified runtime closure is unchanged. Full-history preflight is unavailable in the shallow checkout; immediate declared input-pin ancestry is checked without claiming a complete history audit. Hosted CI and independent scientific acceptance are separate and will be reported at the exact submitted head.PROOF.md, PROFILE.json, COVERAGE-GATE.json, BENCHMARK.json, VALIDATION.json and evidence/ retain the proof, rejected nomination, complete output, resource receipts and limitations. Public resource receipts remove only local absolute script paths and retain original local receipt hashes; scientific stdout is unfiltered.
Credit
Ali Romman's PR #5704, PR #5757, original dense/sparse literal interpreters, engine and controls; PR #5599 and the retained native/controller/compiler/helper/BIT/classical stabilizer lineage; PR #5816 for Linux qualification and the guard; PR #5818 for single-pass orchestration. The complete retained archive and NOTICE preserve predecessor attribution. New setup derivation, controls, profiling and Linux measurements: Chris R / Clear1nsight, with substantial OpenAI Codex assistance; no subagents or independent human/proof-kernel acceptance. Memoization/tabulation are standard techniques. Apache-2.0.
Open next questions
Review the source-bound replacement and its complete-key/independence argument before adopting the opt-in command. Other-host timing remains open. A changed compiler requires fresh source binding, obligation mapping and finite feasibility before any full construction. Profile any remaining bottleneck under a separately authorized task; no automatic successor experiment, kappa construction, worker swarm, monitor or automation is resumed here.