Skip to content
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

Merged
merged 2 commits into from
Jul 27, 2022
Merged

Conversation

adrhill
Copy link
Collaborator

@adrhill adrhill commented Jul 27, 2022

The previously used DE_2000 from Colors.jl requires a lot more computations than DE_AB, which is a Euclidean metric in LAB colorspace.

By changing two lines of code, I locally get a 4x speed-up:

                                          ID                 time ratio memory ratio
  –––––––––––––––––––––––––––––––––––––––––– –––––––––––––––––––––––––– ––––––––––––
          ["closest color", "color inplace"] 0.22 (5%) :whitecheckmark:    1.00 (1%)
              ["closest color", "color new"] 0.22 (5%) :whitecheckmark:    1.00 (1%)
        ["error diffusion", "color inplace"] 0.28 (5%) :whitecheckmark:    1.00 (1%)
            ["error diffusion", "color new"] 0.22 (5%) :whitecheckmark:    1.00 (1%)
  ["error diffusion", "per-channel inplace"]              1.08 (5%) :x:    1.00 (1%)
      ["error diffusion", "per-channel new"]              1.08 (5%) :x:    1.00 (1%)
      ["ordered dithering", "color inplace"] 0.51 (5%) :whitecheckmark:    1.00 (1%)
          ["ordered dithering", "color new"] 0.37 (5%) :whitecheckmark:    1.01 (1%)

Rerunning the benchmarks from #70, I now get:

img = testimage("cameraman");
dither_bw(img) = dither(Bool, img)

@btime dither_bw($img) # 2.170 ms (5 allocations: 1.25 MiB)
cs = rand(RGB, 8)

@btime dither($img, $cs) # 113.670 ms (8 allocations: 3.00 MiB)

@adrhill adrhill added the run benchmark Run benchmark CI action label Jul 27, 2022
@codecov
Copy link

codecov bot commented Jul 27, 2022

Codecov Report

Merging #87 (74cb365) into master (3a15890) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #87   +/-   ##
=======================================
  Coverage   97.77%   97.77%           
=======================================
  Files          13       13           
  Lines         270      270           
=======================================
  Hits          264      264           
  Misses          6        6           
Impacted Files Coverage Δ
src/api/color.jl 90.00% <ø> (ø)

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 3a15890...74cb365. Read the comment docs.

@adrhill
Copy link
Collaborator Author

adrhill commented Jul 27, 2022

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)

@github-actions
Copy link
Contributor

Benchmark result

Judge result

Benchmark Report for /home/runner/work/DitherPunk.jl/DitherPunk.jl

Job Properties

  • Time of benchmarks:
    • Target: 27 Jul 2022 - 01:33
    • Baseline: 27 Jul 2022 - 01:36
  • Package commits:
    • Target: 2699a1
    • Baseline: 3a1589
  • Julia commits:
    • Target: 742b9a
    • Baseline: 742b9a
  • Julia command flags:
    • Target: None
    • Baseline: None
  • Environment variables:
    • Target: None
    • Baseline: None

Results

A ratio greater than 1.0 denotes a possible regression (marked with ❌), while a ratio less
than 1.0 denotes a possible improvement (marked with ✅). Only significant results - results
that indicate possible regressions or improvements - are shown below (thus, an empty table means that all
benchmark results remained invariant between builds).

ID time ratio memory ratio
["closest color", "binary inplace"] 1.34 (5%) ❌ 1.00 (1%)
["closest color", "binary new"] 1.91 (5%) ❌ 1.00 (1%)
["closest color", "color inplace"] 0.35 (5%) ✅ 1.00 (1%)
["closest color", "color new"] 0.35 (5%) ✅ 1.00 (1%)
["error diffusion", "color inplace"] 0.38 (5%) ✅ 1.15 (1%) ❌
["error diffusion", "color new"] 0.28 (5%) ✅ 0.68 (1%) ✅
["ordered dithering", "color inplace"] 0.47 (5%) ✅ 0.70 (1%) ✅
["ordered dithering", "color new"] 0.40 (5%) ✅ 0.61 (1%) ✅
["threshold dithering", "binary inplace"] 1.44 (5%) ❌ 1.00 (1%)
["threshold dithering", "binary new"] 1.47 (5%) ❌ 1.00 (1%)

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • ["closest color"]
  • ["error diffusion"]
  • ["ordered dithering"]
  • ["threshold dithering"]

Julia versioninfo

Target

Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      Ubuntu 20.04.4 LTS
  uname: Linux 5.15.0-1014-azure #17~20.04.1-Ubuntu SMP Thu Jun 23 20:01:51 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz: 
              speed         user         nice          sys         idle          irq
       #1  2593 MHz       2108 s          2 s        184 s       3669 s          0 s
       #2  2593 MHz       2636 s          1 s        215 s       3128 s          0 s
       
  Memory: 6.780967712402344 GB (3157.32421875 MB free)
  Uptime: 601.67 sec
  Load Avg:  1.21  1.15  0.66
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake-avx512)

Baseline

Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      Ubuntu 20.04.4 LTS
  uname: Linux 5.15.0-1014-azure #17~20.04.1-Ubuntu SMP Thu Jun 23 20:01:51 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz: 
              speed         user         nice          sys         idle          irq
       #1  2593 MHz       2182 s          2 s        189 s       4822 s          0 s
       #2  2593 MHz       3789 s          1 s        228 s       3198 s          0 s
       
  Memory: 6.780967712402344 GB (3286.4609375 MB free)
  Uptime: 725.24 sec
  Load Avg:  1.13  1.14  0.73
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake-avx512)

Target result

Benchmark Report for /home/runner/work/DitherPunk.jl/DitherPunk.jl

Job Properties

  • Time of benchmark: 27 Jul 2022 - 1:33
  • Package commit: 2699a1
  • Julia commit: 742b9a
  • Julia command flags: None
  • Environment variables: None

Results

Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the ID column have the structure [parent_group, child_group, ..., key], and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.

ID time GC time memory allocations
["closest color", "binary inplace"] 7.133 μs (5%) 64.11 KiB (1%) 2
["closest color", "binary new"] 6.917 μs (5%) 64.11 KiB (1%) 2
["closest color", "color inplace"] 51.475 ms (5%) 36.50 MiB (1%) 2359336
["closest color", "color new"] 51.397 ms (5%) 36.48 MiB (1%) 2357848
["closest color", "per-channel inplace"] 1.115 ms (5%) 192.05 KiB (1%) 2
["closest color", "per-channel new"] 1.096 ms (5%) 192.05 KiB (1%) 2
["error diffusion", "binary inplace"] 859.412 μs (5%) 320.23 KiB (1%) 5
["error diffusion", "binary new"] 854.312 μs (5%) 320.23 KiB (1%) 5
["error diffusion", "color inplace"] 58.144 ms (5%) 37.25 MiB (1%) 2359340
["error diffusion", "color new"] 44.678 ms (5%) 22.07 MiB (1%) 1364528
["error diffusion", "per-channel inplace"] 3.515 ms (5%) 960.42 KiB (1%) 11
["error diffusion", "per-channel new"] 3.491 ms (5%) 960.42 KiB (1%) 11
["ordered dithering", "binary inplace"] 115.501 μs (5%) 69.42 KiB (1%) 5
["ordered dithering", "binary new"] 109.901 μs (5%) 69.42 KiB (1%) 5
["ordered dithering", "color inplace"] 312.355 ms (5%) 11.862 ms 256.51 MiB (1%) 7340077
["ordered dithering", "color new"] 314.975 ms (5%) 13.978 ms 245.96 MiB (1%) 6241214
["ordered dithering", "per-channel inplace"] 1.232 ms (5%) 207.98 KiB (1%) 11
["ordered dithering", "per-channel new"] 1.215 ms (5%) 207.98 KiB (1%) 11
["threshold dithering", "binary inplace"] 15.100 μs (5%) 128.22 KiB (1%) 4
["threshold dithering", "binary new"] 14.100 μs (5%) 128.22 KiB (1%) 4
["threshold dithering", "per-channel inplace"] 1.143 ms (5%) 384.38 KiB (1%) 8
["threshold dithering", "per-channel new"] 1.123 ms (5%) 384.38 KiB (1%) 8

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • ["closest color"]
  • ["error diffusion"]
  • ["ordered dithering"]
  • ["threshold dithering"]

Julia versioninfo

Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      Ubuntu 20.04.4 LTS
  uname: Linux 5.15.0-1014-azure #17~20.04.1-Ubuntu SMP Thu Jun 23 20:01:51 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz: 
              speed         user         nice          sys         idle          irq
       #1  2593 MHz       2108 s          2 s        184 s       3669 s          0 s
       #2  2593 MHz       2636 s          1 s        215 s       3128 s          0 s
       
  Memory: 6.780967712402344 GB (3157.32421875 MB free)
  Uptime: 601.67 sec
  Load Avg:  1.21  1.15  0.66
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake-avx512)

Baseline result

Benchmark Report for /home/runner/work/DitherPunk.jl/DitherPunk.jl

Job Properties

  • Time of benchmark: 27 Jul 2022 - 1:36
  • Package commit: 3a1589
  • Julia commit: 742b9a
  • Julia command flags: None
  • Environment variables: None

Results

Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the ID column have the structure [parent_group, child_group, ..., key], and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.

ID time GC time memory allocations
["closest color", "binary inplace"] 5.333 μs (5%) 64.11 KiB (1%) 2
["closest color", "binary new"] 3.617 μs (5%) 64.11 KiB (1%) 2
["closest color", "color inplace"] 145.504 ms (5%) 36.48 MiB (1%) 2357848
["closest color", "color new"] 148.148 ms (5%) 36.48 MiB (1%) 2357848
["closest color", "per-channel inplace"] 1.114 ms (5%) 192.05 KiB (1%) 2
["closest color", "per-channel new"] 1.096 ms (5%) 192.05 KiB (1%) 2
["error diffusion", "binary inplace"] 859.711 μs (5%) 320.23 KiB (1%) 5
["error diffusion", "binary new"] 850.512 μs (5%) 320.23 KiB (1%) 5
["error diffusion", "color inplace"] 152.005 ms (5%) 32.40 MiB (1%) 2041376
["error diffusion", "color new"] 157.541 ms (5%) 32.40 MiB (1%) 2041376
["error diffusion", "per-channel inplace"] 3.560 ms (5%) 960.42 KiB (1%) 11
["error diffusion", "per-channel new"] 3.544 ms (5%) 960.42 KiB (1%) 11
["ordered dithering", "binary inplace"] 115.001 μs (5%) 69.42 KiB (1%) 5
["ordered dithering", "binary new"] 109.600 μs (5%) 69.42 KiB (1%) 5
["ordered dithering", "color inplace"] 666.141 ms (5%) 18.804 ms 364.51 MiB (1%) 14417965
["ordered dithering", "color new"] 795.977 ms (5%) 29.495 ms 401.20 MiB (1%) 16473466
["ordered dithering", "per-channel inplace"] 1.227 ms (5%) 207.98 KiB (1%) 11
["ordered dithering", "per-channel new"] 1.215 ms (5%) 207.98 KiB (1%) 11
["threshold dithering", "binary inplace"] 10.501 μs (5%) 128.22 KiB (1%) 4
["threshold dithering", "binary new"] 9.600 μs (5%) 128.22 KiB (1%) 4
["threshold dithering", "per-channel inplace"] 1.122 ms (5%) 384.38 KiB (1%) 8
["threshold dithering", "per-channel new"] 1.117 ms (5%) 384.38 KiB (1%) 8

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • ["closest color"]
  • ["error diffusion"]
  • ["ordered dithering"]
  • ["threshold dithering"]

Julia versioninfo

Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      Ubuntu 20.04.4 LTS
  uname: Linux 5.15.0-1014-azure #17~20.04.1-Ubuntu SMP Thu Jun 23 20:01:51 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz: 
              speed         user         nice          sys         idle          irq
       #1  2593 MHz       2182 s          2 s        189 s       4822 s          0 s
       #2  2593 MHz       3789 s          1 s        228 s       3198 s          0 s
       
  Memory: 6.780967712402344 GB (3286.4609375 MB free)
  Uptime: 725.24 sec
  Load Avg:  1.13  1.14  0.73
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake-avx512)

Runtime information

Runtime Info
BLAS #threads 2
BLAS.vendor() openblas64
Sys.CPU_THREADS 2

lscpu output:

Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   46 bits physical, 48 bits virtual
CPU(s):                          2
On-line CPU(s) list:             0,1
Thread(s) per core:              1
Core(s) per socket:              2
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           85
Model name:                      Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
Stepping:                        7
CPU MHz:                         2593.906
BogoMIPS:                        5187.81
Hypervisor vendor:               Microsoft
Virtualization type:             full
L1d cache:                       64 KiB
L1i cache:                       64 KiB
L2 cache:                        2 MiB
L3 cache:                        35.8 MiB
NUMA node0 CPU(s):               0,1
Vulnerability Itlb multihit:     KVM: Mitigation: VMX unsupported
Vulnerability L1tf:              Mitigation; PTE Inversion
Vulnerability Mds:               Mitigation; Clear CPU buffers; SMT Host state unknown
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Mmio stale data:   Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Retpolines, STIBP disabled, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Mitigation; Clear CPU buffers; SMT Host state unknown
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt avx512cd avx512bw avx512vl xsaveopt xsavec xsaves md_clear
Cpu Property Value
Brand Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz
Vendor :Intel
Architecture :Skylake
Model Family: 0x06, Model: 0x55, Stepping: 0x07, Type: 0x00
Cores 2 physical cores, 2 logical cores (on executing CPU)
No Hyperthreading hardware capability detected
Clock Frequencies Not supported by CPU
Data Cache Level 1:3 : (32, 1024, 36608) kbytes
64 byte cache line size
Address Size 48 bits virtual, 46 bits physical
SIMD 512 bit = 64 byte max. SIMD vector size
Time Stamp Counter TSC is accessible via rdtsc
TSC increased at every clock cycle (non-invariant TSC)
Perf. Monitoring Performance Monitoring Counters (PMC) are not supported
Hypervisor Yes, Microsoft

@github-actions
Copy link
Contributor

Benchmark result

Judge result

Benchmark Report for /home/runner/work/DitherPunk.jl/DitherPunk.jl

Job Properties

  • Time of benchmarks:
    • Target: 27 Jul 2022 - 01:34
    • Baseline: 27 Jul 2022 - 01:36
  • Package commits:
    • Target: 2699a1
    • Baseline: 3a1589
  • Julia commits:
    • Target: 742b9a
    • Baseline: 742b9a
  • Julia command flags:
    • Target: None
    • Baseline: None
  • Environment variables:
    • Target: None
    • Baseline: None

Results

A ratio greater than 1.0 denotes a possible regression (marked with ❌), while a ratio less
than 1.0 denotes a possible improvement (marked with ✅). Only significant results - results
that indicate possible regressions or improvements - are shown below (thus, an empty table means that all
benchmark results remained invariant between builds).

ID time ratio memory ratio
["closest color", "binary inplace"] 1.18 (5%) ❌ 1.00 (1%)
["closest color", "binary new"] 1.66 (5%) ❌ 1.00 (1%)
["closest color", "color inplace"] 0.39 (5%) ✅ 1.00 (1%)
["closest color", "color new"] 0.36 (5%) ✅ 1.00 (1%)
["error diffusion", "binary new"] 1.07 (5%) ❌ 1.00 (1%)
["error diffusion", "color inplace"] 0.42 (5%) ✅ 1.15 (1%) ❌
["error diffusion", "color new"] 0.30 (5%) ✅ 0.68 (1%) ✅
["ordered dithering", "color inplace"] 0.47 (5%) ✅ 0.70 (1%) ✅
["ordered dithering", "color new"] 0.38 (5%) ✅ 0.61 (1%) ✅
["threshold dithering", "binary inplace"] 1.41 (5%) ❌ 1.00 (1%)
["threshold dithering", "binary new"] 1.69 (5%) ❌ 1.00 (1%)

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • ["closest color"]
  • ["error diffusion"]
  • ["ordered dithering"]
  • ["threshold dithering"]

Julia versioninfo

Target

Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      Ubuntu 20.04.4 LTS
  uname: Linux 5.15.0-1014-azure #17~20.04.1-Ubuntu SMP Thu Jun 23 20:01:51 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz: 
              speed         user         nice          sys         idle          irq
       #1  2394 MHz       1385 s          1 s        186 s       3176 s          0 s
       #2  2394 MHz       3941 s          2 s        262 s        585 s          0 s
       
  Memory: 6.780967712402344 GB (3427.90234375 MB free)
  Uptime: 482.66 sec
  Load Avg:  1.02  1.1  0.63
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, haswell)

Baseline

Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      Ubuntu 20.04.4 LTS
  uname: Linux 5.15.0-1014-azure #17~20.04.1-Ubuntu SMP Thu Jun 23 20:01:51 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz: 
              speed         user         nice          sys         idle          irq
       #1  2394 MHz       1481 s          1 s        190 s       4380 s          0 s
       #2  2394 MHz       5139 s          2 s        280 s        675 s          0 s
       
  Memory: 6.780967712402344 GB (3583.60546875 MB free)
  Uptime: 613.49 sec
  Load Avg:  1.0  1.06  0.68
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, haswell)

Target result

Benchmark Report for /home/runner/work/DitherPunk.jl/DitherPunk.jl

Job Properties

  • Time of benchmark: 27 Jul 2022 - 1:34
  • Package commit: 2699a1
  • Julia commit: 742b9a
  • Julia command flags: None
  • Environment variables: None

Results

Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the ID column have the structure [parent_group, child_group, ..., key], and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.

ID time GC time memory allocations
["closest color", "binary inplace"] 8.700 μs (5%) 64.11 KiB (1%) 2
["closest color", "binary new"] 7.500 μs (5%) 64.11 KiB (1%) 2
["closest color", "color inplace"] 75.539 ms (5%) 36.50 MiB (1%) 2359336
["closest color", "color new"] 72.823 ms (5%) 36.48 MiB (1%) 2357848
["closest color", "per-channel inplace"] 1.081 ms (5%) 192.05 KiB (1%) 2
["closest color", "per-channel new"] 1.063 ms (5%) 192.05 KiB (1%) 2
["error diffusion", "binary inplace"] 891.113 μs (5%) 320.23 KiB (1%) 5
["error diffusion", "binary new"] 949.613 μs (5%) 320.23 KiB (1%) 5
["error diffusion", "color inplace"] 83.533 ms (5%) 37.25 MiB (1%) 2359340
["error diffusion", "color new"] 61.714 ms (5%) 22.07 MiB (1%) 1364528
["error diffusion", "per-channel inplace"] 3.660 ms (5%) 960.42 KiB (1%) 11
["error diffusion", "per-channel new"] 3.717 ms (5%) 960.42 KiB (1%) 11
["ordered dithering", "binary inplace"] 126.902 μs (5%) 69.42 KiB (1%) 5
["ordered dithering", "binary new"] 119.301 μs (5%) 69.42 KiB (1%) 5
["ordered dithering", "color inplace"] 417.253 ms (5%) 17.434 ms 256.51 MiB (1%) 7340077
["ordered dithering", "color new"] 404.773 ms (5%) 15.648 ms 245.96 MiB (1%) 6241214
["ordered dithering", "per-channel inplace"] 1.311 ms (5%) 207.98 KiB (1%) 11
["ordered dithering", "per-channel new"] 1.287 ms (5%) 207.98 KiB (1%) 11
["threshold dithering", "binary inplace"] 18.500 μs (5%) 128.22 KiB (1%) 4
["threshold dithering", "binary new"] 17.200 μs (5%) 128.22 KiB (1%) 4
["threshold dithering", "per-channel inplace"] 1.121 ms (5%) 384.38 KiB (1%) 8
["threshold dithering", "per-channel new"] 1.097 ms (5%) 384.38 KiB (1%) 8

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • ["closest color"]
  • ["error diffusion"]
  • ["ordered dithering"]
  • ["threshold dithering"]

Julia versioninfo

Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      Ubuntu 20.04.4 LTS
  uname: Linux 5.15.0-1014-azure #17~20.04.1-Ubuntu SMP Thu Jun 23 20:01:51 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz: 
              speed         user         nice          sys         idle          irq
       #1  2394 MHz       1385 s          1 s        186 s       3176 s          0 s
       #2  2394 MHz       3941 s          2 s        262 s        585 s          0 s
       
  Memory: 6.780967712402344 GB (3427.90234375 MB free)
  Uptime: 482.66 sec
  Load Avg:  1.02  1.1  0.63
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, haswell)

Baseline result

Benchmark Report for /home/runner/work/DitherPunk.jl/DitherPunk.jl

Job Properties

  • Time of benchmark: 27 Jul 2022 - 1:36
  • Package commit: 3a1589
  • Julia commit: 742b9a
  • Julia command flags: None
  • Environment variables: None

Results

Below is a table of this job's results, obtained by running the benchmarks.
The values listed in the ID column have the structure [parent_group, child_group, ..., key], and can be used to
index into the BaseBenchmarks suite to retrieve the corresponding benchmarks.
The percentages accompanying time and memory values in the below table are noise tolerances. The "true"
time/memory value for a given benchmark is expected to fall within this percentage of the reported value.
An empty cell means that the value was zero.

ID time GC time memory allocations
["closest color", "binary inplace"] 7.400 μs (5%) 64.11 KiB (1%) 2
["closest color", "binary new"] 4.525 μs (5%) 64.11 KiB (1%) 2
["closest color", "color inplace"] 194.526 ms (5%) 36.48 MiB (1%) 2357848
["closest color", "color new"] 202.061 ms (5%) 36.48 MiB (1%) 2357848
["closest color", "per-channel inplace"] 1.087 ms (5%) 192.05 KiB (1%) 2
["closest color", "per-channel new"] 1.063 ms (5%) 192.05 KiB (1%) 2
["error diffusion", "binary inplace"] 890.912 μs (5%) 320.23 KiB (1%) 5
["error diffusion", "binary new"] 887.013 μs (5%) 320.23 KiB (1%) 5
["error diffusion", "color inplace"] 199.961 ms (5%) 32.40 MiB (1%) 2041376
["error diffusion", "color new"] 208.709 ms (5%) 32.40 MiB (1%) 2041376
["error diffusion", "per-channel inplace"] 3.655 ms (5%) 960.42 KiB (1%) 11
["error diffusion", "per-channel new"] 3.699 ms (5%) 960.42 KiB (1%) 11
["ordered dithering", "binary inplace"] 124.002 μs (5%) 69.42 KiB (1%) 5
["ordered dithering", "binary new"] 118.902 μs (5%) 69.42 KiB (1%) 5
["ordered dithering", "color inplace"] 886.923 ms (5%) 26.790 ms 364.51 MiB (1%) 14417965
["ordered dithering", "color new"] 1.062 s (5%) 36.009 ms 401.20 MiB (1%) 16473466
["ordered dithering", "per-channel inplace"] 1.308 ms (5%) 207.98 KiB (1%) 11
["ordered dithering", "per-channel new"] 1.286 ms (5%) 207.98 KiB (1%) 11
["threshold dithering", "binary inplace"] 13.100 μs (5%) 128.22 KiB (1%) 4
["threshold dithering", "binary new"] 10.200 μs (5%) 128.22 KiB (1%) 4
["threshold dithering", "per-channel inplace"] 1.119 ms (5%) 384.38 KiB (1%) 8
["threshold dithering", "per-channel new"] 1.096 ms (5%) 384.38 KiB (1%) 8

Benchmark Group List

Here's a list of all the benchmark groups executed by this job:

  • ["closest color"]
  • ["error diffusion"]
  • ["ordered dithering"]
  • ["threshold dithering"]

Julia versioninfo

Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
      Ubuntu 20.04.4 LTS
  uname: Linux 5.15.0-1014-azure #17~20.04.1-Ubuntu SMP Thu Jun 23 20:01:51 UTC 2022 x86_64 x86_64
  CPU: Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz: 
              speed         user         nice          sys         idle          irq
       #1  2394 MHz       1481 s          1 s        190 s       4380 s          0 s
       #2  2394 MHz       5139 s          2 s        280 s        675 s          0 s
       
  Memory: 6.780967712402344 GB (3583.60546875 MB free)
  Uptime: 613.49 sec
  Load Avg:  1.0  1.06  0.68
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, haswell)

Runtime information

Runtime Info
BLAS #threads 2
BLAS.vendor() openblas64
Sys.CPU_THREADS 2

lscpu output:

Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   46 bits physical, 48 bits virtual
CPU(s):                          2
On-line CPU(s) list:             0,1
Thread(s) per core:              1
Core(s) per socket:              2
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           63
Model name:                      Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
Stepping:                        2
CPU MHz:                         2394.455
BogoMIPS:                        4788.91
Hypervisor vendor:               Microsoft
Virtualization type:             full
L1d cache:                       64 KiB
L1i cache:                       64 KiB
L2 cache:                        512 KiB
L3 cache:                        30 MiB
NUMA node0 CPU(s):               0,1
Vulnerability Itlb multihit:     KVM: Mitigation: VMX unsupported
Vulnerability L1tf:              Mitigation; PTE Inversion
Vulnerability Mds:               Mitigation; Clear CPU buffers; SMT Host state unknown
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Mmio stale data:   Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Retpolines, STIBP disabled, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm invpcid_single pti fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt md_clear
Cpu Property Value
Brand Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
Vendor :Intel
Architecture :Haswell
Model Family: 0x06, Model: 0x3f, Stepping: 0x02, Type: 0x00
Cores 2 physical cores, 2 logical cores (on executing CPU)
No Hyperthreading hardware capability detected
Clock Frequencies Not supported by CPU
Data Cache Level 1:3 : (32, 256, 30720) kbytes
64 byte cache line size
Address Size 48 bits virtual, 46 bits physical
SIMD 256 bit = 32 byte max. SIMD vector size
Time Stamp Counter TSC is accessible via rdtsc
TSC increased at every clock cycle (non-invariant TSC)
Perf. Monitoring Performance Monitoring Counters (PMC) are not supported
Hypervisor Yes, Microsoft

@adrhill adrhill merged commit ed8d020 into master Jul 27, 2022
@adrhill adrhill deleted the ah/fast-color branch July 27, 2022 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run benchmark Run benchmark CI action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant