Skip to content

Reuse literal gate setup: 25.9% less qualification time, full coverage - #5832

Merged
Mister-Meeseeks merged 4 commits into
CrocSwap:mainfrom
Clear1nsight:verify/literal-gate-setup-20261027
Oct 27, 2026
Merged

Mister-Meeseeks merged 4 commits into
CrocSwap:mainfrom
Clear1nsight:verify/literal-gate-setup-20261027

Conversation

@Clear1nsight

@Clear1nsight Clear1nsight commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

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 head a0171b8d2f942cdfc5295307548fe484c570b1ba, retaining original PR #5757 53006fe6031dab5c23d5b7d1cf6a92f411a04a68. The bounded claim precedes execution. Canonical main was refreshed before work and submission and remains de5ec2e7a6074068452f45b1a191b5c72832df4a, 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 ancestor aa49178b0b16cf61ddacfd487226b77baa62d708; 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, source ba8a9e640e1983f3c29993fefa3f46e8ed03313a, 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.

python3 -B scripts/research_package.py --package research/literal-gate-setup-reuse

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 is e55f42805ce373f9b680a9a2406a035b29e88b15. 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.

@Clear1nsight

Copy link
Copy Markdown
Contributor Author

HANDOFF — exact literal-gate setup reuse after PR #5818; local qualification and exact-head hosted CI complete.

  1. Research discussion / PR / artifact: PR #5832, package research/literal-gate-setup-reuse/, following PR #5818, PR #5816 and PR #5757. Pre-execution claim and release.
  2. Exact commit: publication d2012c1e58cf25825e9a004a80545aefec631886; sealed implementation e55f42805ce373f9b680a9a2406a035b29e88b15; retained full PR Share complete P104 qualification: 33.7% less time, both literal oracles #5818 export at a0171b8d2f942cdfc5295307548fe484c570b1ba, bound to our ancestor aa49178b0b16cf61ddacfd487226b77baa62d708; original PR research: speed up the complete selected P104 replay by 2.73x #5757 subject 53006fe6031dab5c23d5b7d1cf6a92f411a04a68; canonical main de5ec2e7a6074068452f45b1a191b5c72832df4a, priority revision 8.
  3. What is established: complete profiling rejects whole-circuit tableau caching (17,651 distinct keys, zero repeats, only 7.222 seconds). It identifies 117.684 seconds of dense literal work. The exact source-bound alternative reuses only independently computed P-address and D-phase tables within that dense implementation. Finite original/derived conformance covers 1,522 states and 22,700 amplitudes, four width-nine cases and 23 boundary/eviction/mutation/exception/source/corruption controls. The 13 original orchestration and seven original source-custody controls remain, plus top-level retained-bundle corruption rejection before imports. Small suites pass normally and under optimization. The initial full serial baseline/prototype pair reduces 283.321 to 207.921 wall seconds and 282.47 to 207.42 CPU seconds (26.61% / 26.57%). The self-contained packaged normal command also passes in 209.925 / 209.20 seconds, saving 25.91% wall / 25.94% CPU against the same baseline. All 17,651 actual states and 9,037,312 amplitudes per literal interpreter, complete original RESULT/CROSS and all original source/native/caller/invoice/compiler/outer/adapter/omission checks remain active. The second literal algorithm and quadratic engine share no new setup cache with the dense interpreter. Scientific stdout is byte-identical. Full optimized mode passes in 214.550 seconds and the read-only, Git-free sealed implementation under -I -O -B, empty PATH and an explicit import root in 213.972 seconds, with all 42 export files unchanged. Six full local scientific commands, including profiling, total 1,408.800 seconds under the staged 900/1,500-second cumulative, 600-second per-command and 1-GiB sampled group limits; no retry, source mutation, stderr or resource stop. All 51 final committed bytes/modes, immediate input-pin ancestry and official export/input checks pass; the ten-file runtime/input/manifest closure matches the tested implementation. Hosted run 40446595840 completes successfully for this exact head, tested at merge ref 69f23bdf950f216b310922617685dabdb7de8a52 against unchanged main. The plan passes 513 tests in 159.957 seconds, with 22 platform skips, and selects only this package. The fresh registered replay passes all finite setup/inherited/custody controls, original complete RESULT/CROSS, full literal-state and single-pass checks, plus committed-input immutability.
  4. What remains uncertain: one baseline with later candidate confirmations is not multiple independent pairs, statistical confidence or universal performance. Kernel peak RSS changes from 519.03 to 522.85 MiB for the packaged normal observation; sampling may miss short peaks. The 512-table LRU bound applies only to the declared exact width/gate domain, with complete-key storage additional. The inherited PR Share complete P104 qualification: 33.7% less time, both literal oracles #5818 shared-process source boundary remains; this is not a second cold source replay. No state/PASS cache, sampling, changed expected scientific receipt, successor-source transfer, new kappa, selected promotion, merge or independent human/proof-kernel acceptance. Five framework assumptions remain. Full-history preflight is unavailable in the shallow checkout; immediate pin ancestry is separately checked. Public resource receipts omit only local absolute script paths and retain original receipt hashes.
  5. Smallest useful next task: review the exact dense-method derivation, scalar-table equality, complete-key and coverage/independence proof before adopting the opt-in command. Other-host performance is open. Changed compiler sources must be authenticated, remapped and tested finitely before new construction. This handoff releases the bounded implementation scope and starts no further experiment; kappa research, Work 1/2, source/literature feeds, workers and automations remain paused.
  6. Reproduction command and expected runtime: python3 -B scripts/research_package.py --package research/literal-gate-setup-reuse runs finite setup/inherited controls and then a fresh full scientific qualification, about 3.5 minutes on this Linux host. The README's benchmark.py pair --workdir NEW_DIRECTORY runs a fresh serial PR Share complete P104 qualification: 33.7% less time, both literal oracles #5818 baseline and candidate, about 8.2 minutes here, and requires complete output equivalence plus at least 15% lower wall and CPU time before its separately gated optimized phase. No historical suite is silently repeated and no existing run directory is overwritten.
  7. Predecessor credit: Ali Romman's PR #5704 engine, PR research: speed up the complete selected P104 replay by 2.73x #5757 integration/oracles/controls and original literal implementations; PR #5599 and the retained native/controller/compiler/helper/BIT/classical stabilizer lineage. PR Validate complete PR #5757 replay on Linux: 2.60x faster with full coverage #5816 supplied Linux qualification and guard; PR Share complete P104 qualification: 33.7% less time, both literal oracles #5818 supplied single-pass orchestration. The exact test-only PR #5761 dependency retains original authorship and cherry-pick reference. The immutable archive and NOTICE preserve full credit. New setup derivation, profiling, controls, measurements and report: Chris R / Clear1nsight, with substantial OpenAI Codex assistance; no subagents. Memoization/tabulation are standard techniques. Apache-2.0.

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.

3 participants