Skip to content

Speed up ranked reclamation with ordered retired-register buckets - #175

Closed
chafreaky wants to merge 1 commit into
CrocSwap:mainfrom
chafreaky:perf/ordered-retired-registers
Closed

chafreaky wants to merge 1 commit into
CrocSwap:mainfrom
chafreaky:perf/ordered-retired-registers

Conversation

@chafreaky

Copy link
Copy Markdown
Contributor

Change and mathematical scope

joint_dual_reclaim_compiler.acquire() sorts the complete retired-register set on every acquisition. Maintain sorted slot buckets by current frame rank instead, preserving the exact descending-rank, ascending-slot selection order. When clearing raises a retired anchor's frame, move that anchor between buckets before its next acquisition.

This addresses the compiler bottleneck identified in #154 and is independent of its concurrent-check and frame-algebra changes. No mathematical hypotheses, emitted words, profile counts, or bound change. The source manifest and derived certificate digests are regenerated through the existing authoring scripts; the complete source closure remains enforced.

On a DGX Spark with Python 3.12, the prototype reduced the two compiler runs from a mean combined 140.1 s to 44.6 s (two runs per variant and axis, reversed order). A separate full original verify_joint_dual.py comparison, including C++ compilation, regeneration, independent replay, profiles and composition, was 128.2 s → 49.7 s (one run per variant). That benchmark used PR165 at 7518fed2688baf25c7c32bae32674f3334b517da; its compiler source is byte-identical to current main d1d6c070f5a8c684727ee7ec35d930f9ebfa9758. These timings are scoped to that verifier, not the whole repository.

Prepared by Chafik Boukhalfa with substantial OpenAI Codex assistance. The PR57 compiler and existing contributor attribution are retained.

Validation

Validated committed tree f1081fabbfadaaaaf7292a40d428dbbb865ce920 on the Spark (Python 3.12.3):

  • make joint-dual-verify: PASS, including the full original verifier and all 10 existing control tests.
  • All 14 native make verify-* groups: PASS in isolated snapshots of the same source. This includes make paired-cube-verify and every isolated unit-test module. The tested source bytes were compared with the published commit.
  • The first verify-positive run lacked the Boost development headers that CI installs. After supplying Ubuntu's Boost 1.83 headers in a local dependency directory, a fresh clone of the identical source passed that complete group. No source or tracked artifact changed during the rerun.
  • Certificate comparison: only the compiler source hash, source-manifest hash, and derived validation-certificate hash change. All mathematical fields and both serialized words are unchanged.
  • git diff --check: PASS.

The complete h=23 and h=25 serialized words and compiler receipts must reproduce exactly, including every input and dirty basis column in both orientations. Independent word replay, prepared transitions, original C++ CRT profiles, all 47 strict inequalities, seven margins and existing adverse controls remain enabled. The conditional bound remains 4764513337/10^14.

@Mister-Meeseeks

Copy link
Copy Markdown
Contributor

Thank you for this contribution. Closing as incorporated into the published historical construction, with attribution retained—not as a rejection.

We rechecked the current head f1081fabbfadaaaaf7292a40d428dbbb865ce920 and all 4 changed files. Every file is preserved byte-for-byte in the PR181 source archive used by the reviewed entrance-bank checkpoint on main. The historical implementation remains reproducible there; this closure does not select its standalone exponent as the current record.

The new central ledger separates incorporated work from pending review. Mathematical claims retain the limitations in the linked review.

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