examples: ternlog_popcnt_gap_probe — the mask_ternlog_popcount loop shape is not the gap - #335
Merged
Merged
Conversation
…hape is not the gap Measures production mask_ternlog_popcount against a no-popcount floor, a Mula-popcount lab arm and the scalar loop, plus a 5-plane two-ternlog comparison. On AVX-512F/BW without VPOPCNTDQ the scalar-lane popcount fallback is as fast as a Mula LUT, and the 3-plane kernel sits within ~1.15x of its floor. Corrects ternlog_fold_probe's claim that the fallback is a LUT path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GXUahz73MZxtxWcfpHp9dG
Contributor
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches📝 Generate docstrings
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_586ea674-1ea3-4ab7-ab5c-5429092bf1ab) |
AdaWorldAPI
marked this pull request as ready for review
September 25, 2026 09:38
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.
This adds
examples/ternlog_popcnt_gap_probe.rs, which measures wheremask_ternlog_popcountloses time. The answer is that its loop shape is not the gap.3 planes,
(a&b)|c. Every arm is asserted equal. The arms are:mask_ternlog_popcount.Results on a Xeon at 2.8 GHz with AVX-512F/BW and no VPOPCNTDQ:
5 planes,
((a|b)&c)^(d&!e), 4K–16K words:U64x8form.Also fixed:
ternlog_fold_probe's header claimed the no-VPOPCNTDQ fallback is a LUT path. It is the scalar-lane fallback, and the header now says so.Tests: example-only, no library change.
cargo clippy --release --example ternlog_popcnt_gap_probe -D warningsis clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01GXUahz73MZxtxWcfpHp9dG
Generated by Claude Code