-
Notifications
You must be signed in to change notification settings - Fork 837
feat: perf small_union and small_symmetric_difference #19069
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…tten for in-place calculations to avoid frequent creation of HybridBitmap.
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR improves performance of bitmap operations by optimizing small_union and small_symmetric_difference functions to perform in-place calculations instead of creating new HybridBitmap instances. Benchmark results show performance improvements of approximately 25-30% for bitmap union operations and 20-25% for XOR operations on overlapping data.
Key changes:
- Refactored
small_unionandsmall_symmetric_differenceto use in-place algorithms that work backwards through the data - Optimized
decode_small_bitmapto useptr::read_unalignedfor better deserialization performance - Added comprehensive benchmark tests for various bitmap aggregate functions
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/common/io/src/bitmap.rs | Refactored small_union and small_symmetric_difference to in-place operations; optimized decode_small_bitmap; updated tests; added performance comments |
| src/query/functions/benches/bench.rs | Reorganized imports into bitmap module; added helper functions and comprehensive benchmark tests for bitmap operations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
small_union and small_symmetric_difference functions were rewritten for in-place calculations to avoid frequent creation of HybridBitmap.
main
pr
Tests
Type of change
This change is