Closed adrhill closed 2 years ago
Any idea how to fix this @johnnychen94?
IndirectArrays fail on Julia 1.0 with
LoadError: return type IndirectArray{RGB{Normed{UInt8,8}},2,Int64,Array{Int64,2},Array{RGB{Normed{UInt8,8}},1}} does not match inferred return type IndirectArray{RGB{Normed{UInt8,8}},_1,_2,_3,Array{RGB{Normed{UInt8,8}},1}} where _3 where _2 where _1
Dropping @inferred
on custom color palette tests.
Sorry I missed the notification.
IndirectArrays fail on Julia 1.0 with ...
Julia has improved the type inference mechanism over time so you might observe a lot of cases like this one. I wouldn't be surprised at all. If the performance doesn't drop dramatically, I'd say "using the latest stable Julia" is already a good solution (to minimize our maintenance efforts).
I'd say "using the latest stable Julia" is already a good solution
I added back tests for Julia >= 1.6. 👍
This brought some improvements all around:
ID time ratio memory ratio
–––––––––––––––––––––––––––––––––––––––––––––– –––––––––––––––––––––––––– –––––––––––––
["closest color", "binary inplace"] 0.77 (5%) :whitecheckmark: 1.00 (1%)
["closest color", "binary new"] 0.68 (5%) :whitecheckmark: 1.00 (1%)
["closest color", "color inplace"] 0.94 (5%) :whitecheckmark: 1.00 (1%)
["closest color", "color new"] 0.89 (5%) :whitecheckmark: 1.00 (1%)
["error diffusion", "binary inplace"] 0.80 (5%) :whitecheckmark: 1.00 (1%)
["error diffusion", "binary new"] 0.80 (5%) :whitecheckmark: 1.00 (1%)
["error diffusion", "color inplace"] 0.85 (5%) :whitecheckmark: 1.62 (1%) :x:
["error diffusion", "color new"] 0.88 (5%) :whitecheckmark: 1.62 (1%) :x:
["ordered dithering", "color inplace"] 0.91 (5%) :whitecheckmark: 1.02 (1%) :x:
["ordered dithering", "color new"] 0.81 (5%) :whitecheckmark: 1.01 (1%) :x:
["threshold dithering", "binary inplace"] 0.86 (5%) :whitecheckmark: 1.00 (1%)
["threshold dithering", "binary new"] 0.90 (5%) :whitecheckmark: 1.00 (1%)
["threshold dithering", "per-channel inplace"] 0.94 (5%) :whitecheckmark: 1.00 (1%)
["threshold dithering", "per-channel new"] 0.94 (5%) :whitecheckmark: 1.00 (1%)
Error diffusion is slower because of a small bug that will be fixed in the next commit.
The benchmarks are very noisy even locally. Maybe 256x256 test images are too small? At least the higher memory usage is now fixed.
The benchmarks are very noisy even locally.
Here are the results from two local runs:
ID time ratio memory ratio
–––––––––––––––––––––––––––––––––––––– –––––––––––––––––––––––––– ––––––––––––
["closest color", "binary inplace"] 1.10 (5%) :x: 1.00 (1%)
["closest color", "binary new"] 1.14 (5%) :x: 1.00 (1%)
["error diffusion", "color inplace"] 1.06 (5%) :x: 1.00 (1%)
["ordered dithering", "binary new"] 0.94 (5%) :whitecheckmark: 1.00 (1%)
["ordered dithering", "color inplace"] 1.05 (5%) :x: 1.00 (1%)
ID time ratio memory ratio
–––––––––––––––––––––––––––––––––––––––––– –––––––––––––––––––––––––– ––––––––––––
["closest color", "binary inplace"] 1.07 (5%) :x: 1.00 (1%)
["closest color", "binary new"] 0.63 (5%) :whitecheckmark: 1.00 (1%)
["error diffusion", "binary inplace"] 1.16 (5%) :x: 1.00 (1%)
["error diffusion", "binary new"] 1.19 (5%) :x: 1.00 (1%)
["error diffusion", "color inplace"] 0.90 (5%) :whitecheckmark: 1.00 (1%)
["error diffusion", "per-channel inplace"] 0.95 (5%) :whitecheckmark: 1.00 (1%)
["error diffusion", "per-channel new"] 0.94 (5%) :whitecheckmark: 1.00 (1%)
["threshold dithering", "binary inplace"] 1.11 (5%) :x: 1.00 (1%)
["threshold dithering", "binary new"] 0.78 (5%) :whitecheckmark: 1.00 (1%)
Maybe this didn't increase performance but it also didn't hurt it.
Codecov Report
90.00% <100.00%> (+0.52%)
100.00% <100.00%> (ø)
100.00% <100.00%> (ø)
100.00% <100.00%> (ø)
66.66% <100.00%> (+16.66%)
98.33% <100.00%> (+0.02%)
Continue to review full report at Codecov.