Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Comparison Boost.Odeint vs Scipy.integrate.odeint?

I have recently stumpled upon the boost.odeint library and I am surprised about the number of possibilities and configurability. However, having used scipy.integrate.odeint extensively (which is essentially a wrapper to ODEPACK in fortran) I wonder how their performances compare. I know that boost.odeint also comes with parallelization, which is not possible with scipy (as far as I know) which would increase performance then a lot, but I am asking for the single core case. However, since I would have to wrap boost.odeint (using cython or boost.python) into python in that case, maybe someone of you has done that already? This would be a great achivement, since all the analysis possibilites are much more advanced in python.

like image 285
varantir Avatar asked Nov 20 '22 15:11

varantir


1 Answers

As far as I can tell from comparing the lists of available steppers for Boost.odeint and scipy.integrate.ode, the only algorithm implemented by both is the Dormand-Prince fifth order stepper, dopri5. You could compare the efficiency of the two implementations of this algorithm in Python by using this Cython wrapper to Boost.odeint (it does not expose all the steppers provided by Boost.odeint, but does expose dopri5).

Depending on your definition of "testing performance" you could also compare different algorithms, but this is obviously not the same thing as comparing two implementations of the same algorithm.

like image 132
jbweston Avatar answered Nov 23 '22 06:11

jbweston