chrisbrahms / Hankel.jl

Quasi-discrete Hankel transform
MIT License
9 stars 7 forks source link

using Bessels.jl for your besselj and gamma calls #37

Open heltonmc opened 1 year ago

heltonmc commented 1 year ago

Thank you for this package! I remember using it tangentially for research last year and found it very helpful.

One thing I was curious about is if Bessels.jl would provide any added benefit here? In general, the besselj and gamma functions are several times faster than the ones provided by SpecialFunctions.jl (we also provide spherical Bessel functions). An advantage is that besselj doesn't allocate so that should be a very helpful memory boost.

I went ahead and cloned the library and swapped in Bessels.jl instead and it did pass all the tests except the ones for BigFloat. That is a current limitation as we only provide single and double precision so far. Are there any particular features that would be helpful here that we could add at Bessels? Or is there a nice example that I could try out to test any performance improvements?

Best, Michael

maxfreu commented 1 year ago

Hi @heltonmc! Can you put your modifications into a fork? I couldn't find it in your repos.

heltonmc commented 1 year ago

Yes of course! Sorry it was just a local clone to test things out but I made it available at https://github.com/heltonmc/Hankel.jl/tree/bessels. This time I modified it so that it would pass the tests for BigFloat by keeping the SpecialFunctions.jl dependency, but it might be beneficial to just wait until BigFloat capabilities come to Bessels.jl...

maxfreu commented 1 year ago

Thank you!