@@ -43,24 +43,24 @@ The I/O limits of the relevant (de)compression library will generally determine
43
43
44
44
### Contenders
45
45
46
- * [ jimp] ( https://www.npmjs.com/package/jimp ) v1.6.0 - Image processing in pure JavaScript.
47
- * [ imagemagick] ( https://www.npmjs.com/package/imagemagick ) v0.1.3 - Supports filesystem only and "* has been unmaintained for a long time * ".
48
- * [ gm] ( https://www.npmjs.com/package/gm ) v1.25.1 - Fully featured wrapper around GraphicsMagick's ` gm ` command line utility, but "* has been sunset * ".
49
- * sharp v0.34.0 / libvips v8.16.1 - Caching within libvips disabled to ensure a fair comparison.
46
+ - [ jimp] ( https://www.npmjs.com/package/jimp ) v1.6.0 - Image processing in pure JavaScript.
47
+ - [ imagemagick] ( https://www.npmjs.com/package/imagemagick ) v0.1.3 - Supports filesystem only and "_ has been unmaintained for a long time _ ".
48
+ - [ gm] ( https://www.npmjs.com/package/gm ) v1.25.1 - Fully featured wrapper around GraphicsMagick's ` gm ` command line utility, but "_ has been sunset _ ".
49
+ - sharp v0.34.3 / libvips v8.17.0 - Caching within libvips disabled to ensure a fair comparison.
50
50
51
51
### Environment
52
52
53
53
#### AMD64
54
54
55
- * AWS EC2 us-west-2 [ c7a.xlarge] ( https://aws.amazon.com/ec2/instance-types/c7a/ ) (4x AMD EPYC 9R14)
56
- * Ubuntu 24.10 [ fad5ba7223f8 ] ( https://hub.docker.com/layers/library/ubuntu/24.10/images/sha256-fad5ba7223f8d87179dfa23211d31845d47e07a474ac31ad5258afb606523c0d )
57
- * Node.js 22.14 .0
55
+ - AWS EC2 us-west-2 [ c7a.xlarge] ( https://aws.amazon.com/ec2/instance-types/c7a/ ) (4x AMD EPYC 9R14)
56
+ - Ubuntu 25.04
57
+ - Node.js 24.3 .0
58
58
59
59
#### ARM64
60
60
61
- * AWS EC2 us-west-2 [ c8g.xlarge] ( https://aws.amazon.com/ec2/instance-types/c8g/ ) (4x ARM Graviton4)
62
- * Ubuntu 24.10 [ 133f2e05cb69 ] ( https://hub.docker.com/layers/library/ubuntu/24.10/images/sha256-133f2e05cb6958c3ce7ec870fd5a864558ba780fb7062315b51a23670bff7e76 )
63
- * Node.js 22.14 .0
61
+ - AWS EC2 us-west-2 [ c8g.xlarge] ( https://aws.amazon.com/ec2/instance-types/c8g/ ) (4x ARM Graviton4)
62
+ - Ubuntu 25.04
63
+ - Node.js 24.3 .0
64
64
65
65
### Task: JPEG
66
66
@@ -72,27 +72,29 @@ Note: jimp does not support Lanczos 3, bicubic resampling used instead.
72
72
73
73
#### Results: JPEG (AMD64)
74
74
75
- | Module | Input | Output | Ops/sec | Speed-up |
76
- | :----------------- | :----- | :----- | ------: | -------: |
77
- | jimp | buffer | buffer | 2.35 | 1.0 |
78
- | imagemagick | file | file | 10.51 | 4.5 |
79
- | gm | buffer | buffer | 11.67 | 5.0 |
80
- | gm | file | file | 11.75 | 5.1 |
81
- | sharp | stream | stream | 60.72 | 25.8 |
82
- | sharp | file | file | 62.37 | 26.5 |
83
- | sharp | buffer | buffer | 65.15 | 27.7 |
75
+ | Package | I/O | Ops/sec | Speed-up |
76
+ | :---------- | :----- | ------: | -------: |
77
+ | jimp | buffer | 2.40 | 1.0 |
78
+ | jimp | file | 2.60 | 1.1 |
79
+ | imagemagick | file | 9.70 | 4.0 |
80
+ | gm | buffer | 11.60 | 4.8 |
81
+ | gm | file | 11.72 | 4.9 |
82
+ | sharp | stream | 59.40 | 24.8 |
83
+ | sharp | file | 62.67 | 26.1 |
84
+ | sharp | buffer | 64.42 | 26.8 |
84
85
85
86
#### Results: JPEG (ARM64)
86
87
87
- | Module | Input | Output | Ops/sec | Speed-up |
88
- | :----------------- | :----- | :----- | ------: | -------: |
89
- | jimp | buffer | buffer | 2.13 | 1.0 |
90
- | imagemagick | file | file | 12.95 | 6.1 |
91
- | gm | buffer | buffer | 13.53 | 6.4 |
92
- | gm | file | file | 13.52 | 6.4 |
93
- | sharp | stream | stream | 46.58 | 21.9 |
94
- | sharp | file | file | 48.42 | 22.7 |
95
- | sharp | buffer | buffer | 50.16 | 23.6 |
88
+ | Package | I/O | Ops/sec | Speed-up |
89
+ | :---------- | :----- | ------: | -------: |
90
+ | jimp | buffer | 2.24 | 1.0 |
91
+ | jimp | file | 2.47 | 1.1 |
92
+ | imagemagick | file | 10.42 | 4.7 |
93
+ | gm | buffer | 12.80 | 5.7 |
94
+ | gm | file | 12.88 | 5.7 |
95
+ | sharp | stream | 45.58 | 20.3 |
96
+ | sharp | file | 47.99 | 21.4 |
97
+ | sharp | buffer | 49.20 | 22.0 |
96
98
97
99
### Task: PNG
98
100
@@ -106,23 +108,23 @@ Note: jimp does not support premultiply/unpremultiply.
106
108
107
109
#### Results: PNG (AMD64)
108
110
109
- | Module | Input | Output | Ops/sec | Speed-up |
110
- | :----------------- | :----- | :----- | ------: | -------: |
111
- | gm | file | file | 8.66 | 1.0 |
112
- | imagemagick | file | file | 8.79 | 1.0 |
113
- | jimp | buffer | buffer | 11.26 | 1.3 |
114
- | sharp | file | file | 27.93 | 3.2 |
115
- | sharp | buffer | buffer | 28.69 | 3.3 |
111
+ | Package | I/O | Ops/sec | Speed-up |
112
+ | :---------- | :----- | ------: | -------: |
113
+ | imagemagick | file | 6.06 | 1.0 |
114
+ | gm | file | 8.44 | 1.4 |
115
+ | jimp | buffer | 10.98 | 1.8 |
116
+ | sharp | file | 28.26 | 4.7 |
117
+ | sharp | buffer | 28.70 | 4.7 |
116
118
117
119
#### Results: PNG (ARM64)
118
120
119
- | Module | Input | Output | Ops/sec | Speed-up |
120
- | :----------------- | :----- | :----- | ------: | -------: |
121
- | gm | file | file | 9.65 | 1.0 |
122
- | imagemagick | file | file | 9.72 | 1.0 |
123
- | jimp | buffer | buffer | 10.68 | 1.1 |
124
- | sharp | file | file | 23.90 | 2.5 |
125
- | sharp | buffer | buffer | 24.48 | 2.5 |
121
+ | Package | I/O | Ops/sec | Speed-up |
122
+ | :---------- | :----- | ------: | -------: |
123
+ | imagemagick | file | 7.09 | 1.0 |
124
+ | gm | file | 8.93 | 1.3 |
125
+ | jimp | buffer | 10.28 | 1.5 |
126
+ | sharp | file | 23.81 | 3.4 |
127
+ | sharp | buffer | 24.19 | 3.4 |
126
128
127
129
## Running the benchmark test
128
130
0 commit comments