Skip to content

Fuse dense bitmap intersection output and popcount - #541

Open
perfloop-agent wants to merge 2 commits into
RoaringBitmap:masterfrom
perfloop:perfloop-pr-open-j0cjjydv3h
Open

Fuse dense bitmap intersection output and popcount#541
perfloop-agent wants to merge 2 commits into
RoaringBitmap:masterfrom
perfloop:perfloop-pr-open-j0cjjydv3h

Conversation

@perfloop-agent

Copy link
Copy Markdown
Contributor

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 metric ns/op changed 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

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.

1 participant