-
-
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
Deprecate vectorized & in favor of compact broadcast syntax #19709
Conversation
@@ -1291,11 +1291,6 @@ for f in (:div, :mod) | |||
end | |||
end | |||
|
|||
function (&)(B::BitArray, x::Bool) |
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.
This will lead to a performance regression, since the corresponding .&
version will have to check each element?
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.
Please see the discussion in #17623, specifically #17623 (comment), #17623 (comment), and #17623 (comment). Best!
Might be better to hold off on these boolean-operator deprecations for |
Thinking along similar lines, I planned to restore the efficient vectorized |
I thought about that, but the problem as usual is that specialized On the other hand, in cases where fusion occurs, you probably don't want the specialized method. For example, on my machine, if I compare f(A) = (A .> 0.3) .& (A .< 0.7)
g(A) = (A .> 0.3) & (A .< 0.7) then So I guess it makes sense to deprecate (Specialized |
Cheers, seems we're on the same page. Writing performant generic |
Subsumed by #19791. |
This pull request deprecates all remaining vectorized
&
methods in favor of compactbroadcast
syntax. Best!