Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speedup Calculation of Halo Propreties #368

Open
daviesje opened this issue Mar 28, 2024 · 0 comments
Open

Speedup Calculation of Halo Propreties #368

daviesje opened this issue Mar 28, 2024 · 0 comments
Assignees
Labels
type: performance: speed Performance improvements that reduce walltime

Comments

@daviesje
Copy link
Contributor

The slowest part of the new halo model is currently the calculation of halo properties (stellar mass and SFR), these involve calculation of the power-law scaling relations and exponential turnovers for each halo.

There are two ways of speeding up this calculation I can think of:

  • Instead of storing halo mass, we store log(halo mass), which would remove all the pow() and exp() calls except for one at the end. We already mostly use log(M) in the sampling interpolation tables so it wouldn't require many changes and perhaps result in a slight speedup there as well. The only downside would be a slightly less intuitive output.
  • Since these relations are constant throughout a run, we can instead define interpolation tables for the mean scaling relations that only need to be initialised once, and tables mostly consisting of power-laws should be very accurate. This would likely be faster than the first option, but it would sacrifice a small amount accuracy near the turnovers and require the management of a few more interpolation tables.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: performance: speed Performance improvements that reduce walltime
Projects
None yet
Development

No branches or pull requests

2 participants