Docs: update performance test results

This commit is contained in:
Lovell Fuller 2020-08-23 16:48:46 +01:00
parent 4b6d45ab8e
commit 78b42c8306

View File

@ -4,11 +4,11 @@ A test to benchmark the performance of this module relative to alternatives.
## The contenders ## The contenders
* [jimp](https://www.npmjs.com/package/jimp) v0.9.3 - Image processing in pure JavaScript. Provides bicubic interpolation. * [jimp](https://www.npmjs.com/package/jimp) v0.16.0 - Image processing in pure JavaScript. Provides bicubic interpolation.
* [mapnik](https://www.npmjs.org/package/mapnik) v4.3.1 - Whilst primarily a map renderer, Mapnik contains bitmap image utilities. * [mapnik](https://www.npmjs.org/package/mapnik) v4.5.2 - Whilst primarily a map renderer, Mapnik contains bitmap image utilities.
* [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.1 - 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.24.0 / libvips v8.9.0 - Caching within libvips disabled to ensure a fair comparison. * sharp v0.26.0 / libvips v8.10.0 - Caching within libvips disabled to ensure a fair comparison.
## The task ## The task
@ -18,25 +18,25 @@ then compress to JPEG at a "quality" setting of 80.
## Test environment ## Test environment
* AWS EC2 eu-west-1 [c5.large](https://aws.amazon.com/ec2/instance-types/c5/) (2x Xeon Platinum 8124M CPU @ 3.00GHz) * AWS EC2 eu-west-1 [c5d.large](https://aws.amazon.com/ec2/instance-types/c5/) (2x Xeon Platinum 8124M CPU @ 3.00GHz)
* Ubuntu 18.04 (hvm-ssd/ubuntu-bionic-18.04-amd64-server-20180912 ami-00035f41c82244dab) * Ubuntu 20.04 (ami-0f1d11c92a9467c07)
* Node.js v12.14.1 * Node.js v14.8.0
## Results ## Results
| Module | Input | Output | Ops/sec | Speed-up | | Module | Input | Output | Ops/sec | Speed-up |
| :----------------- | :----- | :----- | ------: | -------: | | :----------------- | :----- | :----- | ------: | -------: |
| jimp | buffer | buffer | 0.72 | 1.0 | | jimp | buffer | buffer | 0.75 | 1.0 |
| mapnik | buffer | buffer | 3.02 | 4.2 | | mapnik | buffer | buffer | 3.00 | 4.0 |
| gm | buffer | buffer | 3.90 | 5.4 | | gm | buffer | buffer | 4.12 | 5.5 |
| gm | file | file | 3.94 | 5.5 | | gm | file | file | 4.13 | 5.5 |
| imagemagick | file | file | 4.30 | 6.0 | | imagemagick | file | file | 4.30 | 5.7 |
| sharp | stream | stream | 23.65 | 32.8 | | sharp | stream | stream | 22.37 | 29.8 |
| sharp | file | file | 24.66 | 34.3 | | sharp | file | file | 23.40 | 31.2 |
| sharp | buffer | buffer | 25.14 | 34.9 | | sharp | buffer | buffer | 24.01 | 32.0 |
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 4+ core machines, especially those with larger L1/L2 CPU caches.
The I/O limits of the relevant (de)compression library will generally determine maximum throughput. The I/O limits of the relevant (de)compression library will generally determine maximum throughput.