-
Notifications
You must be signed in to change notification settings - Fork 115
Optimized _filt_fir!
for DF2TFilter
#569
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #569 +/- ##
==========================================
- Coverage 97.90% 97.90% -0.01%
==========================================
Files 19 19
Lines 3252 3249 -3
==========================================
- Hits 3184 3181 -3
Misses 68 68 ☔ View full report in Codecov by Sentry. |
7fa57a5
to
e517c0b
Compare
88543bb
to
7b4b688
Compare
19913d2
to
3e4c728
Compare
c606ad6
to
299a721
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the SMALL_FILT_VECT_CUTOFF
dance, but apart from that LGTM.
`VecElement`, (removed multiversioning)
specialized methods should be faster
first only
Co-authored-by: Martin Holters <[email protected]>
I increased it to 19 because (for me, on 1.11.1) it's a small improvement. julia> x = rand(10_000); out = similar(x);
julia> @btime filt!($out, b, a, $x, si) setup=((a, b, si) = (1., rand(19), zeros(18)));
20.700 μs (0 allocations: 0 bytes) # SMALL_FILT_VECT_CUTOFF = 18
18.600 μs (0 allocations: 0 bytes) # SMALL_FILT_VECT_CUTOFF = 19 Or if your question is what it's for, removing inbounds below the cutoff prevents it from vectorizing in some non-optimal way (as it was in 0.7.9). julia> @btime filt!($out, b, a, $x, si) setup=((a, b, si) = (1., rand(15), zeros(14)));
12.900 μs (0 allocations: 0 bytes) # SMALL_FILT_VECT_CUTOFF = 19
17.200 μs (0 allocations: 0 bytes) # SMALL_FILT_VECT_CUTOFF = 12 And if it returns an |
Ah, so the Anyway, from my point of view, this is good to go. |
Yup. And sometimes also on whether a view is passed to |
Also adjusts cutoff, uses
LazyString
for errors.