This is micro-optimization for later on but the functions that are called often like fgh! and the functions therein, could probably have a cache, would have to see if that's digestible to Optim but for instance it seems wasteful to allocate X*theta or the associated residual every time it's called.
This is micro-optimization for later on but the functions that are called often like
fgh!
and the functions therein, could probably have a cache, would have to see if that's digestible to Optim but for instance it seems wasteful to allocateX*theta
or the associated residual every time it's called.