diff --git a/benchmarks-arm64.md b/benchmarks-arm64.md index affaa6b..966d986 100644 --- a/benchmarks-arm64.md +++ b/benchmarks-arm64.md @@ -39,11 +39,11 @@ Pipeline: | | Nearest | Box | Bilinear | Bicubic | Lanczos3 | |----------|:-------:|:------:|:--------:|:-------:|:--------:| -| image | 88.57 | - | 161.64 | 302.78 | 427.58 | -| resize | 18.23 | 57.41 | 100.21 | 182.06 | 269.21 | -| libvips | 26.80 | 127.55 | 106.28 | 207.19 | 278.34 | -| fir rust | 0.90 | 21.87 | 35.17 | 83.46 | 112.76 | -| fir neon | 0.90 | 19.73 | 30.06 | 50.35 | 72.19 | +| image | 88.05 | - | 160.98 | 294.47 | 426.20 | +| resize | 18.14 | 57.28 | 99.28 | 185.31 | 269.80 | +| libvips | 26.19 | 126.94 | 107.36 | 208.17 | 277.11 | +| fir rust | 0.84 | 21.60 | 34.95 | 81.72 | 109.98 | +| fir neon | 0.84 | 19.70 | 29.30 | 49.19 | 73.35 | @@ -62,10 +62,10 @@ Pipeline: | | Nearest | Box | Bilinear | Bicubic | Lanczos3 | |----------|:-------:|:------:|:--------:|:-------:|:--------:| -| resize | 25.54 | 88.18 | 123.40 | 200.42 | 293.80 | -| libvips | 33.41 | 238.14 | 352.40 | 716.10 | 973.96 | -| fir rust | 0.97 | 49.57 | 63.97 | 125.33 | 169.58 | -| fir neon | 0.97 | 37.39 | 50.31 | 78.54 | 107.03 | +| resize | 25.49 | 87.09 | 124.43 | 197.94 | 292.21 | +| libvips | 33.92 | 235.04 | 350.01 | 708.27 | 973.00 | +| fir rust | 0.95 | 47.90 | 62.63 | 125.31 | 167.72 | +| fir neon | 0.95 | 37.47 | 50.57 | 76.71 | 106.23 | @@ -83,11 +83,11 @@ Pipeline: | | Nearest | Box | Bilinear | Bicubic | Lanczos3 | |----------|:-------:|:-----:|:--------:|:-------:|:--------:| -| image | 81.61 | - | 108.99 | 175.51 | 247.57 | -| resize | 10.85 | 27.94 | 40.56 | 64.81 | 96.27 | -| libvips | 12.29 | 50.07 | 38.45 | 70.87 | 94.21 | -| fir rust | 0.47 | 8.81 | 12.35 | 18.06 | 27.73 | -| fir neon | 0.47 | 6.13 | 9.11 | 16.15 | 24.81 | +| image | 82.40 | - | 108.23 | 176.18 | 243.14 | +| resize | 10.63 | 27.73 | 40.17 | 63.92 | 93.05 | +| libvips | 12.24 | 49.95 | 38.41 | 69.98 | 94.07 | +| fir rust | 0.47 | 8.81 | 12.28 | 18.45 | 28.09 | +| fir neon | 0.47 | 5.98 | 9.10 | 15.85 | 24.45 | @@ -108,9 +108,9 @@ Pipeline: | | Nearest | Box | Bilinear | Bicubic | Lanczos3 | |----------|:-------:|:------:|:--------:|:-------:|:--------:| -| libvips | 19.29 | 144.90 | 220.76 | 403.94 | 550.70 | -| fir rust | 0.68 | 37.46 | 46.04 | 61.22 | 71.23 | -| fir neon | 0.68 | 18.38 | 24.45 | 36.89 | 52.69 | +| libvips | 19.00 | 144.15 | 223.38 | 402.93 | 554.41 | +| fir rust | 0.67 | 37.10 | 45.15 | 60.54 | 71.70 | +| fir neon | 0.67 | 18.83 | 25.06 | 37.76 | 52.57 | @@ -128,11 +128,11 @@ Pipeline: | | Nearest | Box | Bilinear | Bicubic | Lanczos3 | |----------|:-------:|:------:|:--------:|:-------:|:--------:| -| image | 91.90 | - | 170.26 | 331.19 | 470.90 | -| resize | 19.59 | 56.26 | 96.88 | 179.84 | 268.43 | -| libvips | 27.43 | 141.41 | 115.52 | 234.66 | 312.04 | -| fir rust | 1.42 | 61.01 | 90.50 | 148.67 | 205.49 | -| fir neon | 1.42 | 63.82 | 71.03 | 93.53 | 132.92 | +| image | 93.07 | - | 169.86 | 332.89 | 475.00 | +| resize | 19.55 | 56.39 | 96.71 | 182.61 | 270.17 | +| libvips | 27.34 | 140.29 | 112.81 | 235.59 | 313.47 | +| fir rust | 1.36 | 61.08 | 89.19 | 145.51 | 203.83 | +| fir neon | 1.36 | 63.59 | 70.68 | 93.43 | 131.31 | @@ -151,10 +151,10 @@ Pipeline: | | Nearest | Box | Bilinear | Bicubic | Lanczos3 | |----------|:-------:|:------:|:--------:|:-------:|:--------:| -| resize | 31.53 | 87.13 | 129.24 | 219.52 | 318.78 | -| libvips | 37.19 | 245.54 | 368.92 | 742.45 | 1004.81 | -| fir rust | 1.59 | 97.25 | 133.51 | 225.08 | 296.06 | -| fir neon | 1.59 | 56.57 | 78.24 | 119.19 | 162.73 | +| resize | 29.04 | 88.00 | 133.03 | 221.31 | 314.83 | +| libvips | 36.63 | 246.57 | 369.53 | 747.34 | 1015.17 | +| fir rust | 1.59 | 96.13 | 131.20 | 218.79 | 292.14 | +| fir neon | 1.59 | 55.42 | 77.15 | 118.79 | 163.50 | @@ -172,11 +172,11 @@ Pipeline: | | Nearest | Box | Bilinear | Bicubic | Lanczos3 | |----------|:-------:|:-----:|:--------:|:-------:|:--------:| -| image | 81.22 | - | 110.96 | 185.44 | 253.11 | -| resize | 11.12 | 27.58 | 43.97 | 72.33 | 98.01 | -| libvips | 12.39 | 55.35 | 41.49 | 80.00 | 104.92 | -| fir rust | 0.63 | 28.46 | 39.16 | 58.51 | 83.71 | -| fir neon | 0.63 | 12.96 | 17.41 | 26.79 | 38.46 | +| image | 82.99 | - | 113.48 | 188.98 | 258.69 | +| resize | 11.09 | 27.46 | 43.78 | 72.15 | 98.44 | +| libvips | 12.35 | 55.60 | 42.90 | 81.53 | 104.17 | +| fir rust | 0.66 | 27.95 | 38.46 | 59.48 | 84.43 | +| fir neon | 0.66 | 13.63 | 17.66 | 27.17 | 38.21 | @@ -197,9 +197,9 @@ Pipeline: | | Nearest | Box | Bilinear | Bicubic | Lanczos3 | |----------|:-------:|:------:|:--------:|:-------:|:--------:| -| libvips | 20.97 | 150.55 | 241.54 | 428.63 | 583.38 | -| fir rust | 1.00 | 61.63 | 80.23 | 115.45 | 153.73 | -| fir neon | 1.00 | 26.84 | 36.52 | 55.71 | 75.56 | +| libvips | 20.74 | 149.18 | 237.81 | 430.47 | 582.17 | +| fir rust | 1.03 | 61.38 | 80.31 | 115.02 | 153.03 | +| fir neon | 1.03 | 27.42 | 36.49 | 55.28 | 74.79 | @@ -217,13 +217,18 @@ Pipeline: | | Nearest | Box | Bilinear | Bicubic | Lanczos3 | |----------|:-------:|:-----:|:--------:|:-------:|:--------:| -| image | 24.55 | - | 49.54 | 78.44 | 104.51 | -| resize | 5.03 | 8.64 | 13.85 | 30.14 | 45.81 | -| libvips | 5.96 | 25.74 | 21.52 | 42.24 | 71.71 | -| fir rust | 0.20 | 9.87 | 14.93 | 29.66 | 51.71 | +| image | 42.00 | - | 96.55 | 185.17 | 250.26 | +| resize | 11.85 | 23.72 | 32.72 | 56.64 | 84.38 | +| libvips | 10.51 | 53.28 | 44.32 | 100.09 | 124.13 | +| fir rust | 0.96 | 21.13 | 32.32 | 53.92 | 79.45 | +Note: +The `resize` crate uses `f32` for intermediate calculations. +The `fast_image_resize` uses `f64`. This is a reason why `fast_image_resize` +is slower or equal in cases with `f32`-based pixels. + ### Resize LA32F (luma with alpha channel) image (F32x2) 4928x3279 => 852x567 @@ -239,10 +244,10 @@ Pipeline: - The `image` crate does not support multiplying and dividing by alpha channel. - The `resize` crate does not support this pixel format. -| | Nearest | Box | Bilinear | Bicubic | Lanczos3 | -|----------|:-------:|:-----:|:--------:|:-------:|:--------:| -| libvips | 11.58 | 70.05 | 101.70 | 176.48 | 252.74 | -| fir rust | 0.38 | 22.75 | 30.35 | 49.41 | 71.81 | +| | Nearest | Box | Bilinear | Bicubic | Lanczos3 | +|----------|:-------:|:------:|:--------:|:-------:|:--------:| +| libvips | 19.41 | 142.92 | 210.17 | 382.61 | 506.77 | +| fir rust | 1.60 | 43.16 | 68.07 | 132.43 | 169.07 | @@ -258,12 +263,12 @@ Pipeline: has converted into RGB32F image. - Numbers in the table mean a duration of image resizing in milliseconds. -| | Nearest | Box | Bilinear | Bicubic | Lanczos3 | -|----------|:-------:|:-----:|:--------:|:-------:|:--------:| -| image | 26.32 | - | 62.99 | 104.89 | 147.02 | -| resize | 8.97 | 16.30 | 24.52 | 48.25 | 72.16 | -| libvips | 11.75 | 60.36 | 52.63 | 113.20 | 197.67 | -| fir rust | 0.83 | 16.39 | 26.95 | 50.36 | 75.58 | +| | Nearest | Box | Bilinear | Bicubic | Lanczos3 | +|----------|:-------:|:------:|:--------:|:-------:|:--------:| +| image | 51.58 | - | 129.50 | 310.96 | 419.49 | +| resize | 20.90 | 34.90 | 66.06 | 128.80 | 189.37 | +| libvips | 23.94 | 141.04 | 117.50 | 280.96 | 365.64 | +| fir rust | 2.29 | 41.90 | 77.14 | 163.38 | 224.46 | @@ -285,7 +290,7 @@ Pipeline: | | Nearest | Box | Bilinear | Bicubic | Lanczos3 | |----------|:-------:|:------:|:--------:|:-------:|:--------:| -| libvips | 23.22 | 111.26 | 140.16 | 249.97 | 381.64 | -| fir rust | 1.01 | 35.88 | 45.64 | 70.56 | 93.29 | +| libvips | 36.40 | 236.39 | 326.62 | 618.09 | 820.17 | +| fir rust | 3.33 | 72.85 | 118.83 | 244.32 | 322.10 | diff --git a/benchmarks-wasm32.md b/benchmarks-wasm32.md index 28610c2..2dccb2a 100644 --- a/benchmarks-wasm32.md +++ b/benchmarks-wasm32.md @@ -216,6 +216,11 @@ Pipeline: +Note: +The `resize` crate uses `f32` for intermediate calculations. +The `fast_image_resize` uses `f64`. This is a reason why `fast_image_resize` +is slower or equal in cases with `f32`-based pixels. + ### Resize LA32F (luma with alpha channel) image (F32x2) 4928x3279 => 852x567