-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
LinearOperators.jl/src/lbfgs.jl
Lines 195 to 197 in 4575ca5
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
LinearOperators.jl/src/lbfgs.jl
Line 190 in 4575ca5
for i = 1:(data.mem) |
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).
Metadata
Metadata
Assignees
Labels
No labels