# Newton + LineSearch in Hot Loop: Reduce allocations

**URL:** <https://discourse.julialang.org/t/newton-linesearch-in-hot-loop-reduce-allocations/122585>\
**Category:** Numerics\
**Tags:** newton-raphson, nonlinearsolve\
**Created:** [November 13, 2024, 1:58pm UTC](https://discourse.julialang.org/t/newton-linesearch-in-hot-loop-reduce-allocations/122585 "2024-11-13T13:58:29Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![DanDoe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dandoe/32/52717_2.png) [@DanDoe](https://discourse.julialang.org/u/DanDoe)\
**Post date:** [November 13, 2024, 4:05pm UTC](https://discourse.julialang.org/t/newton-linesearch-in-hot-loop-reduce-allocations/122585/5 "2024-11-13T16:05:39Z")

</div>

Okay, one more thing: It seems to be not as trivial to set the Jacobian by hand (I cannot resort to AD). I found [this post](https://discourse.julialang.org/t/specifying-analytical-jacobian-in-nonlinearproblem/112932) but unfortunately `NonlinearSolve.jl` still tries to compute the Jacobian using AD.

---

_[View the full topic](https://discourse.julialang.org/t/newton-linesearch-in-hot-loop-reduce-allocations/122585)._
