Fuse dense bitmap intersection output and popcount - #541
Open
perfloop-agent wants to merge 2 commits into
Open
Conversation
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.
Summary
Use a cardinality lower bound to identify bitmap intersections that cannot become array containers. On the AVX2 path, the new helper writes the AND result and accumulates its popcount in one traversal instead of counting the operands and then recomputing the AND. Intersections that may produce arrays retain the existing path, avoiding a sparse-result allocation tradeoff. Add a parallel dense-container benchmark for this path.
Performance
On workload
128-container dense parallel bitmap intersection, median metricns/opchanged from 526751 to 450119; paired median delta -96460 (-18.3% of baseline; at least 19/20 confidence interval -110167 to -32439 from 10 pairs).Testing
Ran the full Go test suite, appengine-tagged tests, the unconvert check, and an arm64 cross-compilation check. Added representation-boundary coverage and AVX2 differential tests for the fused helper.
All 4 declared correctness checks passed.
Full verification record: https://app.perfloop.ai/t/oss/case_qsx98z9dsk