Benchmarks of npm, pnpm, yarn, and shrinkpack install times.
I ran these to understand roughly how well shrinkpack performs, please also see the Benchmarks maintained by pnpm (https://pnpm.io/benchmarks) and yarn (https://yarnpkg.com/benchmarks).
npm install -g npm@8.3.0
npm install -g pnpm@6.24.4
npm install -g shrinkpack@0.19.0
npm install -g yarn@1.22.17
git clone https://github.com/JamieMason/npm-cache-benchmark.git
cd npm-cache-benchmark
node index.js && node report.js
Installer | Average over 5 runs |
---|---|
npm@8.3.0 (offline) | 6.79 |
pnpm@6.24.4 (offline) | 7.38 |
npm@8.3.0 (with shrinkpack) | 12.07 |
npm@8.3.0 | 14.61 |
yarn@1.22.17 (offline) | 16.20 |
pnpm@6.24.4 | 18.28 |
yarn@1.22.17 | 29.85 |
Full results can be found in results.json. Benchmark was run on macOS Monterey 12.0.1 on an early 2015 Macbook Air:
Model Name: MacBook Air
Model Identifier: MacBookAir7,2
Processor Name: Dual-Core Intel Core i7
Processor Speed: 2.2 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 4 MB
Hyper-Threading Technology: Enabled
Memory: 8 GB