Closed axsk closed 1 year ago
I don't see how that line is allocating zeros, it looks like it should just build a range (cheap) and then broadcast the whole line?
I would not have seen it without the VSCode @profview
Oh it's allocating a bit array somewhere? That's wild. Yeah...
Thats the right allocation. To the left there is a call to
function (-)(B::BitArray)
A = zeros(Int, size(B))
...
end
in bitarray.jl, L1149. Does this mean the broadcast is not working?
Try moving the range construction to another line and then doing @..
https://github.com/SciML/StochasticDiffEq.jl/blob/11f3a3c22e1ac73355ae3c76109e88fed6c89d91/src/perform_step/SROCK_perform_step.jl#L428
The line in question is allocating
zeros
In my case the allocation makes up for 6% of total solver time.Not a huge thing but I thought I'd bring it up.