Looking for faster ways to make chi^2 nonlinear fit calculations, for
functions involving integrals, I have compared timings of calculation of chi^2
at a pair of sample points evaluating the integrals by three numerical
methods. In the attached worksheet they are called as follows:
1. chin, using evalf(Int(...))
2. chin2, using the interpolant option (`dsolve/numeric`(sys, range=...))
3. chin3, using evalf(Int(...,method=_d01ajc))
I have obtained timings with Maple 9.5 using first a Celeron 333 MHz under RH7.1
and then a P4 1.8 GHz under Win XP.
My expectation was that the method of the interpolant function were the
fastest of the three, as it is evaluated once for all the data points at a
given point of the parameter space, while the integrals are to be computed for
each data point.
However, the timings that I have obtained with the interpolant function method
are worst by a factor 5 at least. So, it seems that something in my setup
ruins the efficiency.
As I am looking to make these calculations for larger data sets, I would
expect that the time of the calculation grow fast with the number of data
points for evalf@Int methods, while use of an interpolant function
should produce a much better scaling.
So, could you tell me how to improve the speed of my setup?