dispatch.jl: remove LinearAlgebra.mul! overloads #182
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This one is a little more controversial. Originally added by @blegat in #16
At first glance, the problem with this is that we're missing a bunch of methods. Triangular, Symmetric, etc.
I started writing a replacement that would loop over the types in LinearAlgebra. But this just ended up creating a lot of ambiguities because
SparseArrays
does something similar:https://github.com/JuliaSparse/SparseArrays.jl/blob/311b4b4130d9f28a6b5eb55cb7c818e4f7858719/src/linalg.jl#L30-L56
So then I stepped back and asked, why are we even implementing these methods? MutableArithmetics has plenty of support for
operate_to!(C, *, A, B)
, and trying to intercept all of these weird array types based on the element type is ripe for problems.I couldn't really find examples of packages where we call this (it's quite hard to search for
mul!
), so this might lead to a performance regression in some user-code, but arguably they should be using the proper MA API instead of trusting this weird fallback in LinearAlgebra?