Feature request: overloadable updating operators #3217
Labels
needs decision
A decision on this change is needed
won't change
Indicates that work won't continue on an issue or pull request
As far as I can see,
+=
and the other updating operators are not handled via overloadable methods. For example,A += B
results inA = +(A,B)
. There is considerable scope for performance gains, especially for matrices, if one could tailor the behaviour of +=. As an example, consider the case ofA += B
, where both are1000 by 1000
matrices. I get (total elapsed time for 100 such operations) on an 8-core machine:A+=B
: 1sLinalg.BLAS.axpy!(1.0,A,B)
: 0.02s(The advantage of 2 over 1 is that it does not have to allocate a temporary matrix to accomodate the sum. The advantage of 3 over 2 is multiple threads and whatever other magic BLAS does.)
The text was updated successfully, but these errors were encountered: