Closed timholy closed 2 years ago
CC @IanButterworth
Merging #244 (41faa86) into master (424523c) will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #244 +/- ##
=======================================
Coverage 91.86% 91.87%
=======================================
Files 12 12
Lines 1647 1649 +2
=======================================
+ Hits 1513 1515 +2
Misses 134 134
Impacted Files | Coverage Δ | |
---|---|---|
src/imfilter.jl | 91.38% <100.00%> (+0.02%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 424523c...41faa86. Read the comment docs.
Many thanks! Though I thought this would have a bigger effect
julia> @btime imfilter!(img2, img1, kern, "symmetric");
19.865 ms (30 allocations: 7.69 MiB)
master
julia> @btime imfilter!(img2, img1, kern, "symmetric");
20.384 ms (1031 allocations: 7.77 MiB)
Also, I don't quite understand why the key change here makes a difference.. if that if
branch isn't hit, were the interpolations still done when inlined??!
It somehow triggers retention and propagation of a gcframe
. I don't really understand the details, unfortunately.
Putting the string interpolation behind a
@noinline
is the key change, but it doesn't hurt to hoist the range creation.Of the few remaining allocations, about half will be fixed by https://github.com/JuliaLang/julia/pull/43990, as they are another instance of https://github.com/JuliaLang/julia/issues/35972