Skip to content

Instantly share code, notes, and snippets.

@paulodiovani
Last active May 31, 2017 20:33
Show Gist options
  • Save paulodiovani/881189791d8a4f90faf249a26973cba7 to your computer and use it in GitHub Desktop.
Save paulodiovani/881189791d8a4f90faf249a26973cba7 to your computer and use it in GitHub Desktop.
npm Vs yarn time comparison

NPM@5 Vs Yarn

  npm install yarn install
clean install (no cache) 10.80s 6.93s
cached 7.82s 4.89s
cached and lockfile present 5.43s 2.10s
cached and node_modules present 2.22s 4.18s
cached, lockfile and node_modules present 2.07s 0.67s

npm install

no cache

  • real 10.80
  • user 9.71
  • sys 0.83

cached

  • real 7.82
  • user 7.88
  • sys 0.58

cached and packages-lock.json present

  • real 5.43
  • user 5.86
  • sys 0.47

cached and node_modules present

  • real 2.22
  • user 2.24
  • sys 0.12

cached, node_modules and package-lock.json present

  • real 2.07
  • user 2.08
  • sys 0.10
  • npm v4.2.0
  • yarn v0.24.5
  • installing on express v4.15.3
  • using gnu time command
  npm install yarn install
clean install (no cache) 19.70s 6.93s
cached 17.05s 4.89s
cached and lockfile present 13.90s 2.10s
cached and node_modules present 1.49s 4.18s
cached, lockfile and node_modules present 1.63s 0.67s

npm install

no cache

npm install 10.87s user 1.06s system 66% cpu 17.921 total

  • real 19.70
  • user 10.85
  • sys 0.96

cached

npm install 9.58s user 0.84s system 77% cpu 13.365 total

  • real 17.05
  • user 9.77
  • sys 0.82

cached and npm-shrinkwrap.json present

  • real 13.90
  • user 9.99
  • sys 0.96

cached and node_modules present

npm install 1.54s user 0.13s system 110% cpu 1.517 total

  • real 1.49
  • user 1.51
  • sys 0.11

cached, node_modules and npm-shrinkwrap present

npm install 1.72s user 0.10s system 110% cpu 1.642 total

  • real 1.63
  • user 1.70
  • sys 0.09

yarn install

no cache

yarn install 5.29s user 0.63s system 90% cpu 6.565 total

  • real 6.93
  • user 5.57
  • sys 0.68

cached

yarn install 3.19s user 0.34s system 88% cpu 3.992 total

  • real 4.89
  • user 3.37
  • sys 0.34

cached and yarn.lock present

  • real 2.10
  • user 2.24
  • sys 0.32

cached and node_modules present

yarn install 2.57s user 0.17s system 87% cpu 3.135 total

  • real 4.18
  • user 2.84
  • sys 0.15

cached, node_modules and yarn.lock present

yarn install 0.68s user 0.06s system 109% cpu 0.674 total

  • real 0.67
  • user 0.69
  • sys 0.04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment