I’m experimenting with differnt expression and I can’t explain why the dot + is faster than just + in the simple case of matrix addition.
using BenchmarkTools
A = rand(100, 100)
B = rand(100, 100)
function no_dot(A, B)
return [A+B for i in 1:10]
end
function with_dot(A, B)
return [A.+B for i in 1:10]
end
@btime no_dot(A,B)
@btime with_dot(A, B)
Ok, I didn’t for you specifically, but looking up issues under my name I didn’t find it at first, so was actually going to do it for you…, could have sworn I had suggested in the past, which I actually had. Not sure why the search failed the first time.
I did notice the interesting: “Feature suggestion: @ballocs” for some reason I read that as bollocks (would it read the same in English?).
Ok, I think you’re saying already possible (just complicated). See link, but about implementing something better/user-friendly see the open issue. Let’s not discuss new implementation here, to not split the discussion. [Would be ok to post here how do do this exactly, with as-is tools.]