From 3b02134cdc960e2df187d519a51eb1dcf437663b Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Sun, 14 Mar 2021 21:10:26 +0000 Subject: [PATCH] Tests: update latest benchmark test results --- docs/performance.md | 32 ++++++++++++++++---------------- test/bench/package.json | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/performance.md b/docs/performance.md index f4eddf9e..2d8834cb 100644 --- a/docs/performance.md +++ b/docs/performance.md @@ -5,10 +5,10 @@ A test to benchmark the performance of this module relative to alternatives. ## The contenders * [jimp](https://www.npmjs.com/package/jimp) v0.16.1 - Image processing in pure JavaScript. Provides bicubic interpolation. -* [mapnik](https://www.npmjs.org/package/mapnik) v4.5.5 - Whilst primarily a map renderer, Mapnik contains bitmap image utilities. +* [mapnik](https://www.npmjs.org/package/mapnik) v4.5.6 - 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*". * [gm](https://www.npmjs.com/package/gm) v1.23.1 - Fully featured wrapper around GraphicsMagick's `gm` command line utility. -* sharp v0.27.0 / libvips v8.10.5 - Caching within libvips disabled to ensure a fair comparison. +* sharp v0.28.0 / libvips v8.10.6 - Caching within libvips disabled to ensure a fair comparison. ## The task @@ -18,25 +18,25 @@ then compress to JPEG at a "quality" setting of 80. ## Test environment -* AWS EC2 eu-west-1 [c5d.large](https://aws.amazon.com/ec2/instance-types/c5/) (2x Xeon Platinum 8275CL CPU @ 3.00GHz) -* Ubuntu 20.10 (ami-046cdbcee95cdd75c) -* Node.js v14.15.3 +* AWS EC2 eu-west-1 [c5ad.xlarge](https://aws.amazon.com/ec2/instance-types/c5/) (4x AMD EPYC 7R32) +* Ubuntu 20.10 (ami-03f10415e8b0bfb86) +* Node.js v14.16.0 ## Results | Module | Input | Output | Ops/sec | Speed-up | | :----------------- | :----- | :----- | ------: | -------: | -| jimp | buffer | buffer | 0.77 | 1.0 | -| mapnik | buffer | buffer | 3.39 | 4.4 | -| gm | buffer | buffer | 4.30 | 5.6 | -| gm | file | file | 4.33 | 5.6 | -| imagemagick | file | file | 4.39 | 5.7 | -| sharp | stream | stream | 23.81 | 30.9 | -| sharp | file | file | 25.09 | 32.6 | -| sharp | buffer | buffer | 25.60 | 33.2 | +| jimp | buffer | buffer | 0.78 | 1.0 | +| mapnik | buffer | buffer | 3.39 | 4.3 | +| gm | buffer | buffer | 7.84 | 10.1 | +| gm | file | file | 9.24 | 11.8 | +| imagemagick | file | file | 9.37 | 12.0 | +| sharp | stream | stream | 26.84 | 34.4 | +| sharp | file | file | 29.76 | 38.2 | +| sharp | buffer | buffer | 31.60 | 40.5 | Greater libvips performance can be expected with caching enabled (default) -and using 4+ core machines, especially those with larger L1/L2 CPU caches. +and using 8+ 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. @@ -51,7 +51,7 @@ brew install mapnik ``` ```sh -sudo apt-get install imagemagick libmagick++-dev graphicsmagick libmapnik-dev +sudo apt-get install build-essential imagemagick libmagick++-dev graphicsmagick libmapnik-dev ``` ```sh @@ -61,7 +61,7 @@ sudo yum install ImageMagick-devel ImageMagick-c++-devel GraphicsMagick mapnik-d ```sh git clone https://github.com/lovell/sharp.git cd sharp -npm install +npm install --build-from-source cd test/bench npm install npm test diff --git a/test/bench/package.json b/test/bench/package.json index 142c708c..b6eca9a6 100644 --- a/test/bench/package.json +++ b/test/bench/package.json @@ -13,7 +13,7 @@ "gm": "1.23.1", "imagemagick": "0.1.3", "jimp": "0.16.1", - "mapnik": "4.5.5", + "mapnik": "4.5.6", "semver": "7.3.4" }, "license": "Apache-2.0",