image-rs / jpeg-decoder

JPEG decoder written in Rust
Apache License 2.0
149 stars 87 forks source link

Use rayon threads when the rayon feature is enabled #214

Closed paolobarbolini closed 2 years ago

paolobarbolini commented 2 years ago

Depends on #213

Benchmarks

AMD Ryzen 7 4800H

Ubuntu 18.04.6 LTS

decode a 512x512 JPEG   time:   [2.1883 ms 2.2649 ms 2.3384 ms]                                   
                        change: [-4.9549% -0.9413% +3.1557%] (p = 0.65 > 0.05)
                        No change in performance detected.

Benchmarking decode a 512x512 progressive JPEG: Collecting 100 samples in estimated 5.3615 s (900 iteratio                                                                                                          decode a 512x512 progressive JPEG                        
                        time:   [6.1427 ms 6.3208 ms 6.5016 ms]
                        change: [-27.207% -24.426% -21.668%] (p = 0.00 < 0.05)
                        Performance has improved.

Benchmarking decode a 512x512 grayscale JPEG: Collecting 100 samples in estimated 6.3788 s (10k iterations                                                                                                          decode a 512x512 grayscale JPEG                        
                        time:   [675.35 us 696.70 us 718.56 us]
                        change: [-63.466% -62.393% -61.300%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild

Benchmarking extract metadata from an image: Collecting 100 samples in estimated 5.0028 s (5.2M iterations                                                                                                          extract metadata from an image                        
                        time:   [970.75 ns 971.35 ns 971.89 ns]
                        change: [-4.8977% -4.8219% -4.7430%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

Benchmarking decode a 3072x2048 RGB Lossless JPEG: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 27.6s, or reduce sample count to 10.
Benchmarking decode a 3072x2048 RGB Lossless JPEG: Collecting 100 samples in estimated 27.576 s (100 itera                                                                                                          decode a 3072x2048 RGB Lossless JPEG                        
                        time:   [276.75 ms 276.81 ms 276.87 ms]
                        change: [+1.6976% +1.7303% +1.7633%] (p = 0.00 < 0.05)
                        Performance has regressed.

Intel Core i7-8550U

Ubuntu 21.10

Gnuplot not found, using plotters backend
decode a 512x512 JPEG   time:   [2.8599 ms 2.8910 ms 2.9240 ms]
                        change: [-2.9724% -1.4001% +0.2501%] (p = 0.10 > 0.05)
                        No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

Benchmarking decode a 512x512 progressive JPEG: Collecting 100 samples in estimated 5.7137 s (600 iteratio                                                                                                          decode a 512x512 progressive JPEG
                        time:   [9.3316 ms 9.4233 ms 9.5250 ms]
                        change: [+2.4153% +3.6122% +4.8700%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 12 outliers among 100 measurements (12.00%)
  7 (7.00%) high mild
  5 (5.00%) high severe

Benchmarking decode a 512x512 grayscale JPEG: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 5.8s, enable flat sampling, or reduce sample count to 60.
Benchmarking decode a 512x512 grayscale JPEG: Collecting 100 samples in estimated 5.8451 s (5050 iteration                                                                                                          decode a 512x512 grayscale JPEG
                        time:   [1.1542 ms 1.1610 ms 1.1685 ms]
                        change: [-7.3377% -5.9739% -4.5725%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 4 outliers among 100 measurements (4.00%)
  2 (2.00%) high mild
  2 (2.00%) high severe

Benchmarking extract metadata from an image: Collecting 100 samples in estimated 5.0064 s (3.0M iterations                                                                                                          extract metadata from an image
                        time:   [1.6457 us 1.6498 us 1.6556 us]
                        change: [-2.5767% -2.1099% -1.6160%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 9 outliers among 100 measurements (9.00%)
  5 (5.00%) high mild
  4 (4.00%) high severe

Benchmarking decode a 3072x2048 RGB Lossless JPEG: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 52.4s, or reduce sample count to 10.
Benchmarking decode a 3072x2048 RGB Lossless JPEG: Collecting 100 samples in estimated 52.388 s (100 itera                                                                                                          decode a 3072x2048 RGB Lossless JPEG
                        time:   [546.50 ms 550.25 ms 554.27 ms]
                        change: [+1.6200% +2.4212% +3.1390%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild

Rockchip RK3399 Hexa-Core

Ubuntu 20.04.3 LTS

decode a 512x512 JPEG   time:   [5.0102 ms 5.1007 ms 5.1948 ms]
                        change: [-8.1141% -5.7822% -3.3318%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
  7 (7.00%) high mild

decode a 512x512 progressive JPEG
                        time:   [14.747 ms 14.815 ms 14.888 ms]
                        change: [-18.100% -17.506% -16.938%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild

decode a 512x512 grayscale JPEG
                        time:   [1.9758 ms 1.9793 ms 1.9838 ms]
                        change: [-48.206% -48.022% -47.805%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
  2 (2.00%) high mild
  3 (3.00%) high severe

extract metadata from an image
                        time:   [5.1500 us 5.1689 us 5.1929 us]
                        change: [+0.0018% +0.7637% +1.5878%] (p = 0.06 > 0.05)
                        No change in performance detected.

Benchmarking decode a 3072x2048 RGB Lossless JPEG: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 97.2s, or reduce sample count to 10.
decode a 3072x2048 RGB Lossless JPEG
                        time:   [981.38 ms 981.77 ms 982.15 ms]
                        change: [+5.2538% +5.3004% +5.3456%] (p = 0.00 < 0.05)
                        Performance has regressed.