Anonymous View
跳至主要內容

Benchmarks of JavaScript Package Managers

Last benchmarked at: Jun 18, 2026, 7:36 PM (daily updated).

This benchmark compares the performance of npm, pnpm, Yarn Classic, and Yarn PnP (check Yarn's benchmarks for any other Yarn modes that are not included here).

Each row's label lists which of cache, lockfile, and node_modules are warm/present before install runs. Quick mapping to the real world (ordered from slowest to fastest scenario):

  • clean: a brand-new clone — nothing cached, no lockfile, no node_modules.
  • cache: a developer reinstalling without a lockfile.
  • lockfile: a CI server doing its first install.
  • cache+lockfile: a developer reinstalling a known project.
  • cache+node_modules: the lockfile is deleted and install is run again.
  • node_modules: the cache and lockfile are deleted and install is run again.
  • cache+lockfile+node_modules: re-running install when nothing has changed.
  • lockfile+node_modules: the cache is deleted and install is run again.
  • update: dependency versions are bumped in package.json and install is run again.

Lots of Files

The app's package.json here

actioncachelockfilenode_modulesnpmpnpmpnpm 🦀YarnYarn PnP
install28.6s8s2.1s8.2s3.4s
install13.1s4.5s1.3s8s2.9s
install11.6s6.3s1.9s6s1.3s
install8.5s2.1s596ms5.8s1.3s
install1.6s552ms1s7.8sn/a
install1.6s556ms76ms7.7sn/a
install1.2s493ms41ms5.6sn/a
install1.2s509ms42ms5.5sn/a
updaten/an/an/a6.3s8.4s2s6.3s2.9s
Graph of the alotta-files results

pnpm vs pnpm 🦀

pnpm v12 will use a new installation engine for fetching and linking written in Rust. See pacquet.

actioncachelockfilenode_modulespnpmpnpm 🦀
install8s2.1s
install6.3s1.9s
install4.5s1.3s
install2.1s596ms
install556ms76ms
install552ms1s
install509ms42ms
install493ms41ms
updaten/an/an/a8.4s2s
Graph comparing pnpm versions on the alotta-files fixture