This is probably not what you’re looking for, but an obvious way to get around the problem on 1.10 is to write the matrix multiplication yourself:
function mymul!(C, A, B)
for j = axes(C, 2), i = axes(C, 1)
C[i, j] = sum(A[i, k] * B[k, j] for k=axes(A, 2))
end
end
julia> @btime mymul!($B, $Dr, $A)
26.432 ns (0 allocations: 0 bytes)
This is likely a bit slower than the 1.11 mul! version, but is much faster than the allocating version on 1.10
julia> @btime mul!($B, $Dr, $A);
296.651 ns (3 allocations: 14.14 KiB)