FastGaussQuadrature.jl icon indicating copy to clipboard operation
FastGaussQuadrature.jl copied to clipboard

Switch from SpecialFunctions.jl to Bessels.jl

Open oscardssmith opened this issue 1 year ago • 3 comments

Bessels.jl is a lot faster for computing besselj (and has special methods for besselj0 and besselj1 that are incredibly fast).

oscardssmith avatar Nov 19 '24 14:11 oscardssmith

Are computing bessel functions a serious contributor to computational cost?

Though I guess a benefit is that Bessels.jl is pure Julia

dlfivefifty avatar Nov 19 '24 20:11 dlfivefifty

I thought I saw a bunch being computed skimming through the source at https://github.com/JuliaApproximation/FastGaussQuadrature.jl/blob/b654654677bc254e8f936c54bd2128a6dda57bba/src/gaussjacobi.jl#L407, but on closer inspection it appears that this was just broadcasting over 2 scalars, so it's hardly critical.

oscardssmith avatar Nov 19 '24 20:11 oscardssmith

If I recall correctly they need to be computed close to ±1 (where uniform asymptotics are used). But the window where one needs to use uniform asymptotics becomes smaller, and so the number of points requiring uniform asymptotics should grow slower.

(But perhaps I misunderstand)

dlfivefifty avatar Nov 20 '24 11:11 dlfivefifty