-
Notifications
You must be signed in to change notification settings - Fork 613
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
perf(common): optimize BitmapIter
#8848
Conversation
Before:
After:
|
* Add various granularity: 1, 1000, 1000_000
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.
LGTM!
The code looks correct to me. I can't tell why the test failed. 🥵 |
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.
We should reload current_usize
here, otherwise the cache would be stale.
fn nth(&mut self, n: usize) -> Option<Self::Item> {
self.idx += n;
self.next()
}
Codecov Report
@@ Coverage Diff @@
## main #8848 +/- ##
==========================================
- Coverage 70.80% 70.80% -0.01%
==========================================
Files 1172 1172
Lines 194525 194554 +29
==========================================
+ Hits 137733 137747 +14
- Misses 56792 56807 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
BitmapIter
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
HashAggExecutor
#7792 (comment)usize
.get_unchecked
by a factor ofusize
.usize
on to stack for caching reads from memoryOverall maybe save about 1% 🤣
Saves about 17% for bitmap iter itself. See below: #8848 (comment).
Checklist For Contributors
./risedev check
(or alias,./risedev c
)Checklist For Reviewers
Documentation
Click here for Documentation
Types of user-facing changes
Please keep the types that apply to your changes, and remove the others.
Release note