Skip to content

Commit 31cf07f

Browse files
committedNov 26, 2023
Docs: update perf results for next release
Switch from orc to highway is ~25% faster
1 parent 4ffb487 commit 31cf07f

File tree

1 file changed

+39
-39
lines changed

1 file changed

+39
-39
lines changed
 

‎docs/performance.md

+39-39
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@ The I/O limits of the relevant (de)compression library will generally determine
99

1010
## Contenders
1111

12-
* [jimp](https://www.npmjs.com/package/jimp) v0.22.7 - Image processing in pure JavaScript.
12+
* [jimp](https://www.npmjs.com/package/jimp) v0.22.10 - Image processing in pure JavaScript.
1313
* [imagemagick](https://www.npmjs.com/package/imagemagick) v0.1.3 - Supports filesystem only and "*has been unmaintained for a long time*".
1414
* [gm](https://www.npmjs.com/package/gm) v1.25.0 - Fully featured wrapper around GraphicsMagick's `gm` command line utility.
15-
* [@squoosh/lib](https://www.npmjs.com/package/@squoosh/lib) v0.4.0 - Image libraries transpiled to WebAssembly, includes GPLv3 code, but "*Project no longer maintained*".
15+
* [@squoosh/lib](https://www.npmjs.com/package/@squoosh/lib) v0.5.3 - Image libraries transpiled to WebAssembly, includes GPLv3 code, but "*Project no longer maintained*".
1616
* [@squoosh/cli](https://www.npmjs.com/package/@squoosh/cli) v0.7.3 - Command line wrapper around `@squoosh/lib`, avoids GPLv3 by spawning process, but "*Project no longer maintained*".
17-
* sharp v0.32.0 / libvips v8.14.2 - Caching within libvips disabled to ensure a fair comparison.
17+
* sharp v0.33.0 / libvips v8.15.0 - Caching within libvips disabled to ensure a fair comparison.
1818

1919
## Environment
2020

2121
### AMD64
2222

23-
* AWS EC2 us-east-2 [c6a.xlarge](https://aws.amazon.com/ec2/instance-types/c6a/) (4x AMD EPYC 7R13)
24-
* Ubuntu 22.04 20230303 (ami-0122295b0eb922138)
25-
* Node.js 16.19.1
23+
* AWS EC2 us-east-2 [c7a.xlarge](https://aws.amazon.com/ec2/instance-types/c7a/) (4x AMD EPYC 9R14)
24+
* Ubuntu 23.10 [13f233a16be2](https://hub.docker.com/layers/library/ubuntu/23.10/images/sha256-13f233a16be210b57907b98b0d927ceff7571df390701e14fe1f3901b2c4a4d7)
25+
* Node.js 20.10.0
2626

2727
### ARM64
2828

2929
* AWS EC2 us-east-2 [c7g.xlarge](https://aws.amazon.com/ec2/instance-types/c7g/) (4x ARM Graviton3)
30-
* Ubuntu 22.04 20230303 (ami-0af198159897e7a29)
31-
* Node.js 16.19.1
30+
* Ubuntu 23.10 [7708743264cb](https://hub.docker.com/layers/library/ubuntu/23.10/images/sha256-7708743264cbb7f6cf7fc13e915faece45a6cdda455748bc55e58e8de3d27b63)
31+
* Node.js 20.10.0
3232

3333
## Task: JPEG
3434

@@ -43,28 +43,28 @@ Note: jimp does not support Lanczos 3, bicubic resampling used instead.
4343
| Module | Input | Output | Ops/sec | Speed-up |
4444
| :----------------- | :----- | :----- | ------: | -------: |
4545
| jimp | buffer | buffer | 0.84 | 1.0 |
46-
| squoosh-cli | file | file | 1.07 | 1.3 |
47-
| squoosh-lib | buffer | buffer | 1.82 | 2.2 |
48-
| gm | buffer | buffer | 8.41 | 10.0 |
49-
| gm | file | file | 8.45 | 10.0 |
50-
| imagemagick | file | file | 8.77 | 10.4 |
51-
| sharp | stream | stream | 36.36 | 43.3 |
52-
| sharp | file | file | 38.67 | 46.0 |
53-
| sharp | buffer | buffer | 39.44 | 47.0 |
46+
| squoosh-cli | file | file | 1.54 | 1.8 |
47+
| squoosh-lib | buffer | buffer | 2.24 | 2.7 |
48+
| imagemagick | file | file | 11.75 | 14.0 |
49+
| gm | buffer | buffer | 12.66 | 15.1 |
50+
| gm | file | file | 12.72 | 15.1 |
51+
| sharp | stream | stream | 48.31 | 57.5 |
52+
| sharp | file | file | 51.42 | 61.2 |
53+
| sharp | buffer | buffer | 52.41 | 62.4 |
5454

5555
#### Results: JPEG (ARM64)
5656

5757
| Module | Input | Output | Ops/sec | Speed-up |
5858
| :----------------- | :----- | :----- | ------: | -------: |
59-
| jimp | buffer | buffer | 1.02 | 1.0 |
60-
| squoosh-cli | file | file | 1.11 | 1.1 |
61-
| squoosh-lib | buffer | buffer | 2.08 | 2.0 |
62-
| gm | buffer | buffer | 8.80 | 8.6 |
63-
| gm | file | file | 10.05 | 9.9 |
64-
| imagemagick | file | file | 10.28 | 10.1 |
65-
| sharp | stream | stream | 26.87 | 26.3 |
66-
| sharp | file | file | 27.88 | 27.3 |
67-
| sharp | buffer | buffer | 28.40 | 27.8 |
59+
| jimp | buffer | buffer | 0.88 | 1.0 |
60+
| squoosh-cli | file | file | 1.18 | 1.3 |
61+
| squoosh-lib | buffer | buffer | 1.99 | 2.3 |
62+
| gm | buffer | buffer | 6.06 | 6.9 |
63+
| gm | file | file | 10.81 | 12.3 |
64+
| imagemagick | file | file | 10.95 | 12.4 |
65+
| sharp | stream | stream | 33.15 | 37.7 |
66+
| sharp | file | file | 34.99 | 39.8 |
67+
| sharp | buffer | buffer | 36.05 | 41.0 |
6868

6969
## Task: PNG
7070

@@ -80,25 +80,25 @@ Note: jimp does not support premultiply/unpremultiply.
8080

8181
| Module | Input | Output | Ops/sec | Speed-up |
8282
| :----------------- | :----- | :----- | ------: | -------: |
83-
| squoosh-cli | file | file | 0.40 | 1.0 |
84-
| squoosh-lib | buffer | buffer | 0.47 | 1.2 |
85-
| gm | file | file | 6.47 | 16.2 |
86-
| jimp | buffer | buffer | 6.60 | 16.5 |
87-
| imagemagick | file | file | 7.08 | 17.7 |
88-
| sharp | file | file | 17.80 | 44.5 |
89-
| sharp | buffer | buffer | 18.02 | 45.0 |
83+
| squoosh-cli | file | file | 0.34 | 1.0 |
84+
| squoosh-lib | buffer | buffer | 0.51 | 1.5 |
85+
| jimp | buffer | buffer | 3.59 | 10.6 |
86+
| gm | file | file | 8.54 | 25.1 |
87+
| imagemagick | file | file | 9.23 | 27.1 |
88+
| sharp | file | file | 25.43 | 74.8 |
89+
| sharp | buffer | buffer | 25.70 | 75.6 |
9090

9191
### Results: PNG (ARM64)
9292

9393
| Module | Input | Output | Ops/sec | Speed-up |
9494
| :----------------- | :----- | :----- | ------: | -------: |
95-
| squoosh-cli | file | file | 0.40 | 1.0 |
96-
| squoosh-lib | buffer | buffer | 0.48 | 1.2 |
97-
| gm | file | file | 7.20 | 18.0 |
98-
| jimp | buffer | buffer | 7.62 | 19.1 |
99-
| imagemagick | file | file | 7.96 | 19.9 |
100-
| sharp | file | file | 12.97 | 32.4 |
101-
| sharp | buffer | buffer | 13.12 | 32.8 |
95+
| squoosh-cli | file | file | 0.33 | 1.0 |
96+
| squoosh-lib | buffer | buffer | 0.46 | 1.4 |
97+
| jimp | buffer | buffer | 3.51 | 10.6 |
98+
| gm | file | file | 7.47 | 22.6 |
99+
| imagemagick | file | file | 8.06 | 24.4 |
100+
| sharp | file | file | 17.31 | 52.5 |
101+
| sharp | buffer | buffer | 17.66 | 53.5 |
102102

103103
## Running the benchmark test
104104

0 commit comments

Comments
 (0)
Please sign in to comment.