I have a function in a for loop along the lines of this:
function spmat_ops!(B, C, D, E, F, G, b, x) # Upper case vars are SparseMatrixCSC and lower case are Vectors A = B*C + D*E*F + G x = somefastsolver(A,b) end function main() for i = 1:100 spmat_ops!(B, C, D, E, F, G, b, x) b += x end end
SparceMatrixCSC operation is causing a lot of large allocations thus slowing down the code quite a bit. Is there any way to alleviate this?