mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Update performance benchmark results for v0.19.0
This commit is contained in:
parent
3764d63244
commit
8afcb16d8e
@ -2,19 +2,20 @@
|
|||||||
|
|
||||||
### Test environment
|
### Test environment
|
||||||
|
|
||||||
* AWS EC2 eu-central-1 [c4.xlarge](http://aws.amazon.com/ec2/instance-types/#c4) (4x E5-2666 v3 @ 2.90GHz)
|
* AWS EC2 eu-west-1 [c5.large](https://aws.amazon.com/ec2/instance-types/c5/) (2x Xeon Platinum 8124M CPU @ 3.00GHz)
|
||||||
* Ubuntu 16.04.1 LTS (HVM, SSD, 20161115, ami-82cf0aed)
|
* Ubuntu 17.10 (hvm:ebs-ssd, 20180102, ami-0741d47e)
|
||||||
* Node.js v6.9.1
|
* Node.js v8.9.4
|
||||||
|
|
||||||
### The contenders
|
### The contenders
|
||||||
|
|
||||||
* [jimp](https://www.npmjs.com/package/jimp) v0.2.27 - Image processing in pure JavaScript. Bilinear interpolation only.
|
* [jimp](https://www.npmjs.com/package/jimp) v0.2.28 - Image processing in pure JavaScript. Bilinear interpolation only.
|
||||||
* [lwip](https://www.npmjs.com/package/lwip) v0.0.9 - Wrapper around CImg. Compiles outdated, insecure dependencies from source.
|
* [pajk-lwip](https://www.npmjs.com/package/pajk-lwip) v0.2.0 (fork) - Wrapper around CImg that compiles dependencies from source.
|
||||||
* [mapnik](https://www.npmjs.org/package/mapnik) v3.5.14 - Whilst primarily a map renderer, Mapnik contains bitmap image utilities.
|
* [mapnik](https://www.npmjs.org/package/mapnik) v3.6.2 - Whilst primarily a map renderer, Mapnik contains bitmap image utilities.
|
||||||
* [imagemagick-native](https://www.npmjs.com/package/imagemagick-native) v1.9.3 - Wrapper around libmagick++, supports Buffers only.
|
* [imagemagick-native](https://www.npmjs.com/package/imagemagick-native) v1.9.3 - Wrapper around libmagick++, supports Buffers only.
|
||||||
* [imagemagick](https://www.npmjs.com/package/imagemagick) v0.1.3 - Supports filesystem only and "*has been unmaintained for a long time*".
|
* [imagemagick](https://www.npmjs.com/package/imagemagick) v0.1.3 - Supports filesystem only and "*has been unmaintained for a long time*".
|
||||||
* [gm](https://www.npmjs.com/package/gm) v1.23.0 - Fully featured wrapper around GraphicsMagick's `gm` command line utility.
|
* [gm](https://www.npmjs.com/package/gm) v1.23.1 - Fully featured wrapper around GraphicsMagick's `gm` command line utility.
|
||||||
* sharp v0.17.0 / libvips v8.4.2 - Caching within libvips disabled to ensure a fair comparison.
|
* [images](https://www.npmjs.com/package/images) v3.0.1 - Compiles dependencies from source. Provides bicubic interpolation.
|
||||||
|
* sharp v0.19.0 / libvips v8.6.1 - Caching within libvips disabled to ensure a fair comparison.
|
||||||
|
|
||||||
### The task
|
### The task
|
||||||
|
|
||||||
@ -26,18 +27,19 @@ then compress to JPEG at a "quality" setting of 80.
|
|||||||
|
|
||||||
| Module | Input | Output | Ops/sec | Speed-up |
|
| Module | Input | Output | Ops/sec | Speed-up |
|
||||||
| :----------------- | :----- | :----- | ------: | -------: |
|
| :----------------- | :----- | :----- | ------: | -------: |
|
||||||
| jimp (bilinear) | buffer | buffer | 1.06 | 1.0 |
|
| jimp (bilinear) | buffer | buffer | 1.14 | 1.0 |
|
||||||
| lwip | buffer | buffer | 1.87 | 1.8 |
|
| lwip | buffer | buffer | 1.86 | 1.6 |
|
||||||
| mapnik | buffer | buffer | 2.91 | 2.7 |
|
| mapnik | buffer | buffer | 3.34 | 2.9 |
|
||||||
| imagemagick-native | buffer | buffer | 4.03 | 3.8 |
|
| imagemagick-native | buffer | buffer | 4.13 | 3.6 |
|
||||||
| imagemagick | file | file | 7.10 | 6.7 |
|
| gm | buffer | buffer | 4.21 | 3.7 |
|
||||||
| gm | buffer | buffer | 7.08 | 6.7 |
|
| gm | file | file | 4.27 | 3.7 |
|
||||||
| gm | file | file | 7.10 | 6.7 |
|
| imagemagick | file | file | 4.67 | 4.1 |
|
||||||
| sharp | stream | stream | 27.61 | 26.0 |
|
| images (bicubic) | file | file | 6.22 | 5.5 |
|
||||||
| sharp | file | file | 28.41 | 26.8 |
|
| sharp | stream | stream | 24.43 | 21.4 |
|
||||||
| sharp | buffer | file | 28.71 | 27.1 |
|
| sharp | file | file | 25.97 | 22.7 |
|
||||||
| sharp | file | buffer | 28.60 | 27.0 |
|
| sharp | file | buffer | 26.00 | 22.8 |
|
||||||
| sharp | buffer | buffer | 29.08 | 27.4 |
|
| sharp | buffer | file | 26.33 | 23.0 |
|
||||||
|
| sharp | buffer | buffer | 26.43 | 23.1 |
|
||||||
|
|
||||||
Greater libvips performance can be expected with caching enabled (default)
|
Greater libvips performance can be expected with caching enabled (default)
|
||||||
and using 8+ core machines, especially those with larger L1/L2 CPU caches.
|
and using 8+ core machines, especially those with larger L1/L2 CPU caches.
|
||||||
@ -46,19 +48,20 @@ The I/O limits of the relevant (de)compression library will generally determine
|
|||||||
|
|
||||||
### Benchmark test prerequisites
|
### Benchmark test prerequisites
|
||||||
|
|
||||||
Requires both _ImageMagick_ and _GraphicsMagick_:
|
Requires _ImageMagick_, _GraphicsMagick_ and _Mapnik_:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
brew install imagemagick
|
brew install imagemagick
|
||||||
brew install graphicsmagick
|
brew install graphicsmagick
|
||||||
|
brew install mapnik
|
||||||
```
|
```
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo apt-get install imagemagick libmagick++-dev graphicsmagick
|
sudo apt-get install imagemagick libmagick++-dev graphicsmagick mapnik-dev
|
||||||
```
|
```
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo yum install ImageMagick-devel ImageMagick-c++-devel GraphicsMagick
|
sudo yum install ImageMagick-devel ImageMagick-c++-devel GraphicsMagick mapnik-devel
|
||||||
```
|
```
|
||||||
|
|
||||||
### Running the benchmark test
|
### Running the benchmark test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user