pyReactor
pyReactor copied to clipboard
time integration performance improvement
Description
The scipy.integrate.ode module is currently used to step the system of ODEs forward in time. The functions which compute the time derivative of each solution variable are written in pure python/numpy. Can we improve the performance of the ODE integration with little effort?
- Consider supplying an analytic jacobian
- Consider moving physics routines to cython or decorate with numba.jit
Example numba jit decorator usage can be seen in commit: 5bb664f71f79d7c57cce61f89e05212750e936f6
The case for numba: http://matthewrocklin.com/blog/work/2018/01/30/the-case-for-numba It appears since numba migrated from LLVM to LLVMlite it is easier for users to install numba as a dependency. Rather than rewrite the physics routines in cython/C/C++ numba.jit might win out in a time investment vs. speedup.