Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jamonholmgren/6158319a0a1a542d503999833da70c36 to your computer and use it in GitHub Desktop.
Save jamonholmgren/6158319a0a1a542d503999833da70c36 to your computer and use it in GitHub Desktop.
npm vs yarn vs bun install benchmarking for ignite-cli

NPM vs Yarn -- install time benchmarking with Ignite CLI

Benchmark Results (average of 5 runs)

Test Scenario Lock Cache Yarn 4 Node 22 Node 24 Bun 1.2
No cache or lock 9.6s 27.3s 25.5s 6.1s
Lock only 5.4s 7.2s 7.5s 4.5s
Cached install 5.2s 5.2s 5.4s 2.6s
Install again 0.5s 0.8s 0.7s 0.0s

System Info

  • Computer: Mac Studio 2022
  • OS: macOS 15.5
  • Node Version: 22.17.1
  • CPU: M1 Max
  • RAM: 64 GB

Test Commands

Remove items from each command as necessary for each step.

  • NPM: \rm -rf node_modules package-lock.json && npm cache clean --force && time npm install
  • Yarn: \rm -rf node_modules yarn.lock && yarn cache clean && time yarn install
  • Bun: \rm -rf node_modules ~/.bun/install/cache && time bun install

Configuration

Bun is run with no config.

.yarnrc.yml

nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-4.9.1.cjs
enableProgressBars: false
logFilters:
  - code: "YN0000" # Suppress basic logs
    level: discard
  - code: "YN0002" # Suppress missing peer dependency warnings
    level: discard
  - code: "YN0060" # Suppress invalid peer dependency warnings
    level: discard
  - code: "YN0085" # Suppress resolution step logs
    level: discard
  - code: "YN0086" # Suppress peer dependency validation warnings
    level: discard
  - code: "YN0013" # Suppress fetch step logs
    level: discard
  - code: "YN0007" # Suppress build logs
    level: discard
  - code: "*" # Suppress everything else
    level: error

.npmrc

prefer-dedupe=true
audit=false
fund=false
loglevel=error
install-strategy=hoisted

.tool-versions

yarn 1.22.19
nodejs 22.17.1
bun 1.2.19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment