mirror of
https://github.com/lovell/sharp.git
synced 2025-07-15 13:10:13 +02:00
Update benchmarks ahead of sharp v0.17.0 with libvips v8.4.2.
Ubuntu provides newer *magick than Amazon, so this is fairer on it. Add note about the serious security vulnerabilities in lwip.
This commit is contained in:
parent
945706c2a4
commit
27b9481452
@ -3,41 +3,41 @@
|
|||||||
### Test environment
|
### Test environment
|
||||||
|
|
||||||
* AWS EC2 [c4.xlarge](http://aws.amazon.com/ec2/instance-types/#c4) (4x E5-2666 v3 @ 2.90GHz)
|
* AWS EC2 [c4.xlarge](http://aws.amazon.com/ec2/instance-types/#c4) (4x E5-2666 v3 @ 2.90GHz)
|
||||||
* Amazon Linux AMI 2016.03.1 (HVM), SSD Volume Type
|
* Ubuntu 16.04.1 LTS (HVM, SSD)
|
||||||
* Node.js v6.2.0
|
* Node.js v6.9.1
|
||||||
|
|
||||||
### The contenders
|
### The contenders
|
||||||
|
|
||||||
* [jimp](https://www.npmjs.com/package/jimp) v0.2.24 - Image processing in pure JavaScript. Bilinear interpolation only.
|
* [jimp](https://www.npmjs.com/package/jimp) v0.2.27 - Image processing in pure JavaScript. Bilinear interpolation only.
|
||||||
* [lwip](https://www.npmjs.com/package/lwip) v0.0.9 - Wrapper around CImg, compiles dependencies from source.
|
* [lwip](https://www.npmjs.com/package/lwip) v0.0.9 - Wrapper around CImg. Compiles outdated, insecure dependencies from source.
|
||||||
* [imagemagick-native](https://www.npmjs.com/package/imagemagick-native) v1.9.2 - Wrapper around libmagick++, supports Buffers only.
|
* [mapnik](https://www.npmjs.org/package/mapnik) v3.5.14 - 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](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.22.0 - Fully featured wrapper around GraphicsMagick's `gm` command line utility.
|
* [gm](https://www.npmjs.com/package/gm) v1.23.0 - Fully featured wrapper around GraphicsMagick's `gm` command line utility.
|
||||||
* sharp v0.15.0 / libvips v8.3.1 - Caching within libvips disabled to ensure a fair comparison.
|
* sharp v0.17.0 / libvips v8.4.2 - Caching within libvips disabled to ensure a fair comparison.
|
||||||
|
|
||||||
### The task
|
### The task
|
||||||
|
|
||||||
Decompress a 2725x2225 JPEG image,
|
Decompress a 2725x2225 JPEG image,
|
||||||
resize to 720x480 using Lanczos 3 resampling (where available),
|
resize to 720x480 using Lanczos 3 resampling (where available),
|
||||||
then compress to JPEG.
|
then compress to JPEG at a "quality" setting of 80.
|
||||||
|
|
||||||
### Results
|
### Results
|
||||||
|
|
||||||
| Module | Input | Output | Ops/sec | Speed-up |
|
| Module | Input | Output | Ops/sec | Speed-up |
|
||||||
| :----------------- | :----- | :----- | ------: | -------: |
|
| :----------------- | :----- | :----- | ------: | -------: |
|
||||||
| jimp (bilinear) | file | file | 0.94 | 1.0 |
|
| jimp (bilinear) | buffer | buffer | 1.05 | 1.0 |
|
||||||
| jimp (bilinear) | buffer | buffer | 0.98 | 1.0 |
|
| lwip | buffer | buffer | 2.32 | 2.2 |
|
||||||
| lwip | file | file | 1.14 | 1.2 |
|
| mapnik | buffer | buffer | 2.90 | 2.8 |
|
||||||
| lwip | buffer | buffer | 1.14 | 1.2 |
|
| imagemagick-native | buffer | buffer | 4.00 | 3.8 |
|
||||||
| imagemagick-native | buffer | buffer | 1.66 | 1.8 |
|
| imagemagick | file | file | 7.16 | 6.8 |
|
||||||
| imagemagick | file | file | 5.08 | 5.4 |
|
| gm | buffer | buffer | 7.12 | 6.8 |
|
||||||
| gm | buffer | buffer | 5.43 | 5.7 |
|
| gm | file | file | 7.16 | 6.8 |
|
||||||
| gm | file | file | 5.46 | 5.8 |
|
| sharp | stream | stream | 27.97 | 26.6 |
|
||||||
| sharp | stream | stream | 26.52 | 28.2 |
|
| sharp | file | file | 28.69 | 27.3 |
|
||||||
| sharp | file | file | 28.16 | 30.0 |
|
| sharp | buffer | file | 28.81 | 27.4 |
|
||||||
| sharp | file | buffer | 28.27 | 30.1 |
|
| sharp | file | buffer | 28.99 | 27.6 |
|
||||||
| sharp | buffer | file | 28.42 | 30.2 |
|
| sharp | buffer | buffer | 29.17 | 27.8 |
|
||||||
| sharp | buffer | buffer | 28.42 | 30.2 |
|
|
||||||
|
|
||||||
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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user