@@ -12,8 +12,6 @@ let img = ImageReader::open("./assets/nasa-4928x3279.png")
1212let dimensions = img . dimensions ();
1313let transient = img . to_rgb8 ();
1414
15- let start = Instant :: now ();
16-
1715let src_size = ImageSize :: new (dimensions . 0 as usize , dimensions . 1 as usize );
1816let dst_size = ImageSize :: new (dimensions . 0 as usize / 4 , dimensions . 1 as usize / 4 );
1917
@@ -30,28 +28,32 @@ cargo bench --bench resize_rgba --manifest-path ./app/Cargo.toml
3028| | Lanczos3 | Bilinear |
3129| ---------------------------| :--------:| :--------:|
3230| image(aarch64) | 121.19 | 48.89 |
33- | pic-scale(aarch64) | 26.90 | 15.13 |
34- | fir(aarch64) | 25.93 | 11.30 |
31+ | pic-scale(aarch64) | 11.89 | 8.92 |
32+ | fir(aarch64) | 25.89 | 11.30 |
3533| image(x86) | 192.52 | 88.63 |
36- | pic-scale(x86) | 49.79 | 35.98 |
37- | pic-scale(x86-cpu-native) | 27.21 | 20.48 |
34+ | pic-scale(x86) | 25.50 | 18.37 |
3835| fir(x86) | 42.89 | 24.13 |
39- | fir(x86-cpu-native) | 41.17 | 23.62 |
36+ | image(x86-cpu-native) | 205.64 | 89.02 |
37+ | pic-scale(x86-cpu-native) | 14.39 | 11.31 |
38+ | fir(x86-cpu-native) | 41.21 | 22.77 |
4039
4140Example comparison time for downscale RGB 4928x3279 ` 8 bit ` image in 4 times.
4241
4342``` bash
4443cargo bench --bench resize_rgb --manifest-path ./app/Cargo.toml
4544```
4645
47- | | Lanczos3 | Bilinear |
48- | --------------------| :--------:| :--------:|
49- | image(aarch64) | 123.85 | 51.30 |
50- | pic-scale(aarch64) | 31.73 | 18.20 |
51- | fir(aarch64) | 24.04 | 11.37 |
52- | image(x86) | 201.52 | 90.82 |
53- | pic-scale(x86) | 34.54 | 25.05 |
54- | fir(x86) | 41.97 | 25.21 |
46+ | | Lanczos3 | Bilinear |
47+ | ---------------------------| :--------:| :--------:|
48+ | image(aarch64) | 123.85 | 51.30 |
49+ | pic-scale(aarch64) | 17.23 | 12.32 |
50+ | fir(aarch64) | 23.61 | 10.53 |
51+ | image(x86) | 201.52 | 90.82 |
52+ | pic-scale(x86) | 27.17 | 21.08 |
53+ | fir(x86) | 41.97 | 24.39 |
54+ | image(x86-cpu-native) | 184.57 | 84.69 |
55+ | pic-scale(x86-cpu-native) | 20.96 | 15.16 |
56+ | fir(x86-cpu-native) | 41.49 | 20.38 |
5557
5658Example comparison time for downscale RGBA 4928x3279 ` 16 bit ` image in 4 times.
5759
@@ -61,40 +63,51 @@ cargo bench --bench resize_rgba_u16 --manifest-path ./app/Cargo.toml
6163
6264| | Lanczos3 | Bilinear |
6365| ---------------------------| :--------:| :--------:|
64- | image(aarch64) | 123.27 | 52.91 |
65- | pic-scale(aarch64) | 28.041 | 18.89 |
66- | fir(aarch64) | 149.87 | 50.08 |
67- | image(x86) | 196.28 | 194.75 |
68- | pic-scale(x86) | 59.89 | 57.99 |
69- | pic-scale(x86-cpu-native) | 44.07 | 57.99 |
70- | fir(x86) | 52.73 | 28.35 |
66+ | image(aarch64) | 262.32 | 76.91 |
67+ | pic-scale(aarch64) | 15.49 | 11.38 |
68+ | fir(aarch64) | 141.78 | 50.08 |
69+ | image(x86) | 196.28 | 107.78 |
70+ | pic-scale(x86) | 57.48 | 50.85 |
71+ | fir(x86) | 139.56 | 58.48 |
72+ | image(x86-cpu-native) | 192.85 | 102.05 |
73+ | pic-scale(x86-cpu-native) | 39.60 | 46.44 |
74+ | fir(x86-cpu-native) | 101.48 | 52.58 |
7175
7276Example comparison time for downscale RGB 4928x3279 ` 16 bit ` image in 4 times.
7377
7478``` bash
7579cargo bench --bench resize_rgb_u16 --manifest-path ./app/Cargo.toml
7680```
7781
78- | | Lanczos3 | Bilinear |
79- | --------------------| :--------:| :--------:|
80- | image(aarch64) | 130.45 | 61.06 |
81- | pic-scale(aarch64) | 36.10 | 23.80 |
82- | fir(aarch64) | 122.01 | 43.36 |
82+ | | Lanczos3 | Bilinear |
83+ | ---------------------------| :--------:| :--------:|
84+ | image(aarch64) | 130.45 | 57.38 |
85+ | pic-scale(aarch64) | 16.17 | 12.11 |
86+ | fir(aarch64) | 110.06 | 42.04 |
87+ | image(x86) | 204.10 | 148.34 |
88+ | pic-scale(x86) | 43.21 | 145.73 |
89+ | fir(x86) | 210.28 | 51.29 |
90+ | image(x86-cpu-native) | 190.21 | 98.42 |
91+ | pic-scale(x86-cpu-native) | 33.48 | 28.50 |
92+ | fir(x86-cpu-native) | 72.88 | 45.17 |
8393
8494Example comparison time for downscale RGBA 4928x3279 ` f32 ` image in 4 times.
8595
8696``` bash
8797cargo bench --bench resize_rgba_f32 --manifest-path ./app/Cargo.toml
8898```
8999
90- | | Lanczos3 | Bilinear |
91- | --------------------| :--------:| :--------:|
92- | image(aarch64) | 100.16 | 51.21 |
93- | pic-scale(aarch64) | 43.04 | 19.16 |
94- | fir(aarch64) | 114.35 | 37.75 |
95- | image(x86) | 164.04 | 98.90 |
96- | pic-scale(x86) | 57.39 | 43.84 |
97- | fir(x86) | 60.30 | 29.92 |
100+ | | Lanczos3 | Bilinear |
101+ | ---------------------------| :--------:| :--------:|
102+ | image(aarch64) | 100.16 | 50.09 |
103+ | pic-scale(aarch64) | 14.07 | 11.18 |
104+ | fir(aarch64) | 105.30 | 37.75 |
105+ | image(x86) | 208.25 | 107.84 |
106+ | pic-scale(x86) | 33.55 | 28.97 |
107+ | fir(x86) | 92.38 | 74.12 |
108+ | image(x86-cpu-native) | 162.83 | 108.54 |
109+ | pic-scale(x86-cpu-native) | 33.13 | 28.54 |
110+ | fir(x86-cpu-native) | 56.65 | 59.96 |
98111
99112This project is licensed under either of
100113
0 commit comments