rodluger / Limbdark.jl

Analytical transit light curves for limb darkened stars
MIT License
14 stars 4 forks source link

Making transit_poly/s2 code more efficient #24

Closed ericagol closed 5 years ago

ericagol commented 6 years ago
ericagol commented 6 years ago

@rodluger I implemented the simultaneous computation of the elliptic integrals and I reused the elliptic integrals from s2 to compute I_v and J_v and their derivatives. This sped the code up by about 30% from 0.5 seconds for 10^6 transit evaluations to 0.35 seconds (for quadratic limb-darkening). So, not a huge savings, but significant, and now it's about 30% faster than Pal's code compiled with -O3. I'm doing a lot of other inefficient things in the computation, though, so I suspect that there is still more room for improvement.