|
for j ∈ eachindex(q) |
|
q[j] += bx * data.b[k][j] - ax * data.a[k][j] |
|
end |
This is highly inefficient. There are too many memory accesses being performed. We should replace with
@. q += bx .* data.b[k] - ax .* data.a[k]
In the same function there is also
which should be improved with the @inbounds macro.
@dpo I am already getting huge improvements just with this (regarding the discussion we had this morning on Zulip).
LinearOperators.jl/src/lbfgs.jl
Lines 195 to 197 in 4575ca5
This is highly inefficient. There are too many memory accesses being performed. We should replace with
In the same function there is also
LinearOperators.jl/src/lbfgs.jl
Line 190 in 4575ca5
which should be improved with the
@inboundsmacro.@dpo I am already getting huge improvements just with this (regarding the discussion we had this morning on Zulip).