Skip to content

Instantly share code, notes, and snippets.

@slavafomin slavafomin/
Last active May 17, 2018

What would you like to do?
npm 5 vs yarn

npm 5 vs yarn

Looks like npm decided to stand up to yarn by releasing npm version 5, which is announced to be 5 times faster than previous version of npm.

I've decided to test it in one of my projects, the results are below:

Performance Benchmark

I've used three different versions of package managers and series of 10 installations, then I've calculated the average values.

During all my tests I've deleted the resulted files, cleared the cache and deleted lock-files.


  • npm 4.6.1 — 57s

  • npm 5.0.0 — 24s

  • yarn 0.24.6 — 15s

  • npm 5 is 2.4 times faster than npm 4

  • yarn is 3.8 times faster than npm 4

  • yarn is 1.6 times faster than npm 5

So, it looks like npm overestimated they performance improvements at least 2x times. And yarn is still fastest package manager at the moment, so I'm going to stick with it.


This comment has been minimized.

Copy link

leebenson commented Jun 7, 2017

Could you post a copy of your package.json here please?

I'm curious if any of your dependencies have postinstall scripts that Yarn isn't running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.