Skip to content

[DO NOT MERGE] Measure package manager performance#348

Draft
mizdra wants to merge 1 commit intomainfrom
measure-pnpm-performance
Draft

[DO NOT MERGE] Measure package manager performance#348
mizdra wants to merge 1 commit intomainfrom
measure-pnpm-performance

Conversation

@mizdra
Copy link
Owner

@mizdra mizdra commented Feb 24, 2026

I will investigate whether migrating from npm to other package managers improves performance.

No cache

$ hyperfine --warmup 1 --prepare="rm -rf **/node_modules && npm cache clean --force" "npm i" --prepare="rm -rf **/node_modules && pnpm store prune" "pnpm i"
Benchmark 1: npm i
  Time (mean ± σ):      1.506 s ±  0.090 s    [User: 0.910 s, System: 0.179 s]
  Range (min … max):    1.399 s …  1.676 s    10 runs

Benchmark 2: pnpm i
  Time (mean ± σ):     350.3 ms ±  17.5 ms    [User: 480.6 ms, System: 120.2 ms]
  Range (min … max):   335.5 ms … 387.3 ms    10 runs

Summary
  pnpm i ran
    4.30 ± 0.33 times faster than npm i

Cache

$ hyperfine --warmup 1 --prepare="rm -rf **/node_modules" "npm i" --prepare="rm -rf **/node_modules" "pnpm i"
Benchmark 1: npm i
  Time (mean ± σ):     627.4 ms ±  16.0 ms    [User: 548.7 ms, System: 96.1 ms]
  Range (min … max):   611.9 ms … 657.0 ms    10 runs

Benchmark 2: pnpm i
  Time (mean ± σ):     343.3 ms ±   5.1 ms    [User: 471.1 ms, System: 114.6 ms]
  Range (min … max):   335.9 ms … 351.7 ms    10 runs

Summary
  pnpm i ran
    1.83 ± 0.05 times faster than npm i

@changeset-bot
Copy link

changeset-bot bot commented Feb 24, 2026

⚠️ No Changeset found

Latest commit: 250ed46

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant