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
add state while scanning #25418
add state while scanning #25418
Conversation
510bbc6
to
3d692fd
Compare
a2b5f02
to
b0e5339
Compare
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. Thanks!
self.mismatch_found.fetch_add(1, Ordering::Relaxed); | ||
} | ||
} | ||
if self.accum.is_empty() { |
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.
could use init_accum
instead.
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.
I think this looks good. The problem description makes sense, but I don't fully understand all the code. Glad there was another set of eyes on it as well.
if self.accum.is_empty() { | ||
self.accum.append(&mut vec![Vec::new(); self.range]); | ||
} |
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.
Could this call self.init_accum(self.range)
instead?
Pull request has been modified.
Codecov Report
@@ Coverage Diff @@
## master #25418 +/- ##
=========================================
- Coverage 82.1% 82.1% -0.1%
=========================================
Files 621 621
Lines 170297 170393 +96
=========================================
+ Hits 139917 139946 +29
- Misses 30380 30447 +67 |
Problem
Aiming towards efficiency and simplicity wrt scanning billions of accounts in multiple passes.
Having a struct can reduce the code that runs per append vec and more importantly per account.
We can also add filtering later, reducing the work to skip accounts that don't match the current pass.
Summary of Changes
Fixes #