Open felix-clark opened 3 years ago
If possible I think it would be best to use an external crate for caching in general, in order to keep the code in this package from getting more complicated than it needs to be.
The cached
crate could be useful here, although caching of member functions is not yet implemented.
Some operations are performed repeatedly in the implementation of the
Fit
result. The covariance matrix is already cached manually, which is most important because this is probably anO(n^3)
calculation. Some other functions and operations may be of only linear complexity but be called repeatedly and potentially involve relatively slow function calls like logarithms.Some potential caching targets: