A nice summary of how to best use the FastInterpolations spline objects in julia optimization loops is available at
https://projecttorreypines.github.io/FastInterpolations.jl/stable/guides/optimization/
Basically all the newton iterations in the code should be replaced with these for speed and accuracy.