Skip to content

Optimize by changing how reaction rates are computed #37

Description

@Nicholaswogan

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%.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions