Skip to content

Conversation

@beckermr
Copy link
Collaborator

This PR adds a pseudo-Pade approximation for the Spergel HLR computation. This code runs about 100x faster than the root finding code, sometimes even faster than that. Here is an example:

# nu = 2.7
root finding time: 4.613792 ms
pade time: 0.052833 ms

The notebook dev/notebooks/spergel_hlr_flux_radius_approx.ipynb has the code that fits the pseudo-Pade approximation.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 18, 2025

CodSpeed Performance Report

Merging #130 will improve performances by ×120

Comparing spergel-hlr-pade (2dead7f) with main (c96d517)

Summary

⚡ 2 improvements
✅ 19 untouched benchmarks

Benchmarks breakdown

Benchmark main spergel-hlr-pade Change
test_benchmark_spergel_init[compile] 1,901.2 ms 16 ms ×120
test_benchmark_spergel_init[run] 1,527.3 µs 81.6 µs ×19

@beckermr beckermr enabled auto-merge (squash) January 18, 2025 12:03
@beckermr beckermr merged commit 671176c into main Jan 18, 2025
6 checks passed
@beckermr beckermr deleted the spergel-hlr-pade branch January 18, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants