-
Notifications
You must be signed in to change notification settings - Fork 4
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 faster default color difference metric DE_AB
#87
Conversation
Codecov Report
@@ Coverage Diff @@
## master #87 +/- ##
=======================================
Coverage 97.77% 97.77%
=======================================
Files 13 13
Lines 270 270
=======================================
Hits 264 264
Misses 6 6
Continue to review full report at Codecov.
|
And rerunning the benchmark code from here on my machine: # DitherPunk.jl
using DitherPunk, TestImages
img_gray = testimage("cameraman")
img_rgb = testimage("peppers_color")
# gray - binary
@btime dither($img_gray); # 2.262 ms (5 allocations: 1.25 MiB)
# gray - cmap
cmap = DitherPunk.get_colorscheme(img_gray, 8)
@btime dither($img_gray, $cmap); # 376.023 ms (5230704 allocations: 82.82 MiB)
# rgb - binary
@btime dither($img_rgb); # 9.477 ms (11 allocations: 3.75 MiB)
# rgb - cmap
cmap = DitherPunk.get_colorscheme(img_rgb, 8)
@btime dither($img_rgb, $cmap); # 269.264 ms (5230676 allocations: 148.68 MiB) |
Benchmark resultJudge resultBenchmark Report for /home/runner/work/DitherPunk.jl/DitherPunk.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/DitherPunk.jl/DitherPunk.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/DitherPunk.jl/DitherPunk.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
Benchmark resultJudge resultBenchmark Report for /home/runner/work/DitherPunk.jl/DitherPunk.jlJob Properties
ResultsA ratio greater than
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfoTarget
Baseline
Target resultBenchmark Report for /home/runner/work/DitherPunk.jl/DitherPunk.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Baseline resultBenchmark Report for /home/runner/work/DitherPunk.jl/DitherPunk.jlJob Properties
ResultsBelow is a table of this job's results, obtained by running the benchmarks.
Benchmark Group ListHere's a list of all the benchmark groups executed by this job:
Julia versioninfo
Runtime information
|
The previously used
DE_2000
from Colors.jl requires a lot more computations thanDE_AB
, which is a Euclidean metric in LAB colorspace.By changing two lines of code, I locally get a 4x speed-up:
Rerunning the benchmarks from #70, I now get: