-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Generalize broadcast!(f, ::BitVector)
optimization to BitArray
.
#52736
Conversation
This is great! |
Co-authored-by: Matt Bauman <mbauman@gmail.com>
I really wish the compiler was smart enough to do this itself. It is somewhat annoying that there isn't a good way to efficiently use BitVectors other than working with the chunks directly, but while that is the case, I approve of this. |
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 SGTM, but may need added tests?
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. |
And limit the usage of `@inbounds`
Follows #32048.
This PR fully avoids the allocation thus make nd logical broadcast better scaled for small inputs.
Some Benchmark
So looks like this change is a general win as the iteration in the 1st dimension is better vectorized.