-
Notifications
You must be signed in to change notification settings - Fork 112
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
Prettier tests #608
Prettier tests #608
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #608 +/- ##
=======================================
Coverage 97.96% 97.96%
=======================================
Files 19 19
Lines 3248 3248
=======================================
Hits 3182 3182
Misses 66 66 ☔ View full report in Codecov by Sentry. |
one_buffer = similar(x1, 1) | ||
for (i, p) in enumerate(x1) | ||
y1[i] = filt(myfilt, setindex!(one_buffer, p, 1))[1] |
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'm not sure these @timeinteractive
should be taken seriously at all (I never look at them), so this optimization might be nothing more than an unnecessary complication. But even if care about the allocations here, wouldn't
one_buffer = similar(x1, 1) | |
for (i, p) in enumerate(x1) | |
y1[i] = filt(myfilt, setindex!(one_buffer, p, 1))[1] | |
for i in eachindex(x1) | |
y1[i] = filt(myfilt, @view(x[i:i]))[1] |
cut it? (And likewise below.)
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.
Yes, should have done that...
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.
Ah, the view also allocates, once every iteration. So I did actually try that some time ago, which was probably why I set up a buffer here.
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.
Ah, that's unfortunate. Rework after fixing #605, then 😄
@@ -36,7 +36,7 @@ julia> diric(0, 4) | |||
``` | |||
""" | |||
function diric(Ω::T, n::Integer) where T <: AbstractFloat | |||
n > 0 || throw(ArgumentError("n=$n not positive")) | |||
n > 0 || throw(DomainError(n, "n not positive")) |
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 wouldn't file this under "prettier tests", but still a good change.
one_buffer
restore double newline
- foreach - move test_quinn - eps -> atol
d920d2f
to
ef474bb
Compare
No description provided.