I've done benchmarking that has shown that reaction_rates is one of the slowest functions in the right-hand-side call. The main reason is because all of the calls to exp and pow, which are slow functions.
I'm calling reaction_rates every singe time step. But this isn't really necessary. The actual rate coefficients only depend on temperature. So they can be computed once prior to an integration, and updated whenever temperature changes. During an integration, third-body densities will need to be added in to some of the rate coefficients. But this will be very fast.
At best, I think this will speed up a right-hand-side evaluation by ~35%.
I've done benchmarking that has shown that
reaction_ratesis one of the slowest functions in the right-hand-side call. The main reason is because all of the calls toexpandpow, which are slow functions.I'm calling
reaction_ratesevery singe time step. But this isn't really necessary. The actual rate coefficients only depend on temperature. So they can be computed once prior to an integration, and updated whenever temperature changes. During an integration, third-body densities will need to be added in to some of the rate coefficients. But this will be very fast.At best, I think this will speed up a right-hand-side evaluation by ~35%.