Open
Description
I really like the NLsolve.jl package in conjunction with LineSearches.jl - great stuff!
I have a scalar, relatively simple nonlinear equation that I can solve using
res = nlsolve(gamma -> f(gamma[1], bla, bla, bla),
gamma -> j(gamma[1], bla, bla, bla),
[gamma], method = :newton, ftol = 2 * eps(RealT), iterations = 20,
linesearch = LineSearches.BackTracking(order=3))
gamma = res.zero[1]
which works really well.
The issue is, however, that I get a couple allocations whenever I call this. Is there any way to reduce these by e.g. initalizing the problem once and then updating it later?
The functions f
and g
stay constant over time, although their arguments bla
change over time.
Xref: https://discourse.julialang.org/t/newton-linesearch-in-hot-loop-reduce-allocations/122585
Metadata
Assignees
Labels
No labels
Activity