-
Notifications
You must be signed in to change notification settings - Fork 107
performance[vortex-array]: don't call is_valid to count bytes in varbinview #5814
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
Conversation
CodSpeed Performance ReportMerging #5814 will improve performance by 17.98%Comparing Summary
Benchmarks breakdown
Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
compression slowdown is interesting, I'll a look but overall seems like a win 🥳 |
AdamGS
left a comment
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
|
It seems like it's due to now including |
265ca2d to
a98c27d
Compare
…inview I noticed that the better blocks compressor uses count_referenced_bytes which calls is_valid on each view and results in an expensive scalar_at call. This was 30% of our system-wide CPU usage over 12 hours (see PR for attached screenshot). This commit iterates over the nullability mask directly to avoid these expensive calls. Signed-off-by: Alfonso Subiotto Marques <alfonso.subiotto@polarsignals.com>
a98c27d to
7fda16d
Compare
|
Looking at a few codspeed diffs, seems like it can't figure out the diff correctly, so it thinks all the traces are new |
Yes, I also think this is codspeed. I don't think the runend benchmarks (that the regression reported) use varbinviews. Also now codspeed seems to be happy again. |
|
I am very confused how VarBinViewVTable::is_valid ends up calling scalar at, is it the case that you have runend compressed validity? |
|
vortex/vortex-array/src/validity.rs Line 135 in 31026ce
But it does seem like the expensive part is specifically |
|
Ah, it was me not reading through the code deep enough. |
|
Yeah this is why I want to make it really really obvious with the operators work what is "executing", vs operating on metadata only. I think even deprecating these scalar validity accessor functions, and instead just forcing the user to execute the array validity. (Still working on a name for "execute"!) Great catch though |
I noticed that the better blocks compressor uses
count_referenced_byteswhich callsis_validon each view and results in an expensivescalar_atcall. This was 30% of our system-wide CPU usage over 12 hours (see PR for attached screenshot).This commit iterates over the nullability mask directly to avoid these expensive calls.