-
Notifications
You must be signed in to change notification settings - Fork 113
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
Use Bessels.jl for Bessel function calculations #538
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #538 +/- ##
=======================================
Coverage 97.56% 97.56%
=======================================
Files 18 18
Lines 3125 3125
=======================================
Hits 3049 3049
Misses 76 76 ☔ View full report in Codecov by Sentry. |
56db461
to
92d1891
Compare
Issue with macOS x64 CI seems to be a problem with the Codecov coverage upload rather than the code itself, so unless you have strong opinions on not supporting Bessels.jl v0.1, this seems ready. |
Sorry for the slow response, was searching JuliaHub and the general registry on mobile. While I'm in principle fine with including 0.1, of Bessels' dependents, only SparseIR.jl v0.94 (which has only 2 dependents) had a Compat for 0.1, and it changed compat to 0.2 in the next release. |
Replace calls to `SpecialFunctions.besseli(0, ...)` with calls to `Bessels.besseli0(...)`, adding Bessels.jl (https://github.com/JuliaMath/Bessels.jl) as a dependency. When resampling signals with a very low or high arbitrary rate, the call to `Windows.kaiser` is what dominates. Profiling this, most of the time is taken up by the call to `SpecialFunctions.besseli`. This allocates, but also the computation is just fundamentally slow for these arguments. Replacing these calls with those to `Bessels.besseli0` gives a factor of 17 speedup when resampling a 1000-point random trace to a rate of 0.02. Closes JuliaDSP#506.
92d1891
to
2a7de1b
Compare
Okay, no problem—I've changed that in the updated commit. And your response is by no description slow! Thank you for taking on some of the DSP.jl maintenance! |
Replace calls to
SpecialFunctions.besseli(0, ...)
with calls toBessels.besseli0(...)
, adding Bessels.jl(https://github.com/JuliaMath/Bessels.jl) as a dependency.
When resampling signals with a very low or high arbitrary rate, the call
to
Windows.kaiser
is what dominates. Profiling this, most of the timeis taken up by the call to
SpecialFunctions.besseli
. This allocates,but also the computation is just fundamentally slow for these arguments.
Replacing these calls with those to
Bessels.besseli0
gives a factorof 17 speedup when resampling a 1000-point random trace to a rate of
0.02.
Closes #506.