Package Manager Benchmark
Ce contenu n’est pas encore disponible dans votre langue.
Comparing package manager (PM) to improve CI performances
Procedure
Section titled “Procedure”The following PM are considered:
bun(1.0.23) bun install linkpnpm(8.14.0) pnpm install linkyarn(1.22.21) yarn install linknpm(10.2.5) npm install link
Software used to test: hyperfine
hyperfine "bun install --backend=hardlink" "pnpm install --ignore-scripts" "yarn install --no-scripts" "npm install --force --no-scripts --ignore-scripts" --warmup=4 --prepare="rm -rf node_modules" --cleanup="rm -rf node_modules" --export-markdown="package-manager-benchmark.md"Results
Section titled “Results”| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
bun install --backend=hardlink | 1.014 ± 0.066 | 0.923 | 1.131 | 1.00 |
pnpm install --ignore-scripts | 2.060 ± 0.095 | 1.955 | 2.244 | 2.03 ± 0.16 |
yarn install --no-scripts | 7.883 ± 0.234 | 7.594 | 8.299 | 7.77 ± 0.56 |
npm install --force --no-scripts --ignore-scripts | 10.155 ± 0.324 | 9.711 | 10.860 | 10.01 ± 0.73 |
Date: 2024-01-23
Configuration
Section titled “Configuration”- CPUs: 16
- CPU Name: 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
- Architecture: x86_64
- Software: Ubuntu 22.04.3 LTS (Jammy)
Conclusion
Section titled “Conclusion”The fastest tested package manager is bun but when using on the Windows
platform, it lacks stability at the moment.
Therefore, we can try pnpm.
To install:
# On MacOS and Linuxcurl -fsSL https://get.pnpm.io/install.sh | sh -
# On Windows (using PowerShell)iwr https://get.pnpm.io/install.ps1 -useb | iex