facet: per-axis LCP reads the single register — the fold was done at mint - #1241
Conversation
shared_prefix_tiles already reads the whole facet as one register
(u128 xor + trailing_zeros/16, one vpxor+tzcnt); the per-axis
hi_distance/lo_distance thirty lines above it still walked six bytes
in a loop. Same fold, per axis: the six tier bytes are formatted by
position into a LE u64 ("{0}…{5}" -f chain, tier 0 lowest), xor,
trailing_zeros/8, clamp 6 on xor == 0.
Falsifier compares the fold against the loop it replaced at every
divergence tier on both axes plus the identical case; disable-verified
red by reversing the fold's byte order (fails at "hi t=0").
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DCfrD5y19cvFc4AoyydXYv
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCfrD5y19cvFc4AoyydXYv
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (2)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour. 📝 WalkthroughWalkthrough
ChangesFacet prefix folding
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Refactor Suggested reviewers: Merge Risk: ⚪ Minimal · up to The facet distance optimization preserves axis prefix calculations, with no actionable merge risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 77.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
A rabbit reads each line, Comment |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_c76396a6-84a2-402b-aea1-3661b180a419) |
…eady done at mint The u128 facet stores every tier as hi:lo by position, so the per-axis prefix is the whole-facet xor masked to that axis's tier bytes, then trailing_zeros/16 past the classid — no hi_chain/lo_chain gather, no per-call re-fold. Replaces fold6 from the previous commit. Same tests; disable-verified red by swapping HI_BYTES/LO_BYTES. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCfrD5y19cvFc4AoyydXYv
…out numbers Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCfrD5y19cvFc4AoyydXYv
Hygiene-only PR — generates no further entry (termination clause). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCfrD5y19cvFc4AoyydXYv
board: record PR #1241 post-merge (arc entry + LATEST_STATE)
…the Locked formula (Codex on #1243) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCfrD5y19cvFc4AoyydXYv
What
shared_prefix_tilesalready reads the whole facet as one register (u128xor +trailing_zeros/16);hi_distance/lo_distance(shared6) still gathered six strided bytes per axis into a chain and walked them in a loop.Operator correction on the first cut (which re-folded the gathered chain into a
u64): fold the{0}{1} -flogic once — and theu128facet already holds both axes by position, so an axis prefix is the whole-facet xor masked to that axis's tier bytes (HI_BYTES= 5,7,…,15;LO_BYTES= 4,6,…,14), thentrailing_zeros/16past the classid. No gather, no per-call re-fold.const fn, no new deps.Falsifier compares against the loop it replaced at every divergence tier on both axes plus the identical case; disable-run (swap
HI_BYTES/LO_BYTES) fails athi flip at tier 0.Board:
E-FORMAT-SLOT-FOLD-IS-THE-SAME-OP-AS-THE-VL-DESCENT-1(EPIPHANIES prepend, same PR).Reality check — before/after, 64K random facet pairs, release, best of 7
hi+lo distance, byte loop (before)hi+lo distance, gathered chain →u64fold (first cut)hi+lo distance, masked single-register readout (shipped)prefix_distance(u128, whole facet)0 mismatches over 65 536 pairs at every step. Both axes together now cost what one whole-facet readout costs — the compare is the 1–4-cycle op and nothing is gathered in front of it.
🤖 Generated with Claude Code
https://claude.ai/code/session_01DCfrD5y19cvFc4AoyydXYv
Summary by CodeRabbit
Performance
Bug Fixes
Documentation