NPM 与 Yarn 基准性能测试

    
banq 16-10-19

Yarn是Facebook最近推出的替代NPM的Node.js依赖管理,声称比NPM要更快和可靠的。有人对它们进行了基准性能测试:


-----------------------------------------------------------------------
-------------------------- RESULTS (seconds) --------------------------
-----------------------------------------------------------------------
| | angular2 | ember | react |
| npm_with_empty_cache | 15.687 | 56.993 | 93.650 |
| npm_with_all_cached | 9.380 | 52.380 | 81.213 |
| yarn_with_empty_cache | 9.477 | 30.757 | 37.497 |
| yarn_with_all_cached | 4.650 | 15.090 | 17.730 |
-----------------------------------------------------------------------


经过各种集成环境Travis、Snap CI、 Semaphore、CircleCI,得出基本结论:
Yarn 比NPM快2到3倍


NPM vs Yarn benchmark - Berriart