Skip to content

JIT compilation with numba #6

Description

@oashour

My first thought was to use @jitclass, which I did for the numerics module in a4e2e21. However, this approach would be a long and painful road since every single class would have to be a @jitclass since they are all used in Calculator, and thus every single method in the entire package will have to be @njit compatible. This is simply not practical (nor desired, nor necessary).

The best option is a heavy refactoring of the code so that I'm computing the binned rate as a (n_velocities, n_masses, n_modes, n_bins) array, i.e., all the Single[...]Reach classes need to be heavily reworks so that I'm not looping over them and calculating the rate for each (v_e, m_chi) pair individually. Those classes should do all the setup, then the entire rate calculation can be taken outside the classes into an njitted method that does nothing but array operations.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestperformancePerformance improvements

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions