This experiment is designed to find out the performance and resource usage of map functions of both ES6 and Lodash
As the result of the article in jsperf.com _(2015)_shows that, Lodash performances faster than Native Javascript. I was shocked! Lodash is built on top of Native Javascript, how come a wrapped lib could do the same things faster than its mother language?
For the reason of curiosity, an experiment is made, by handling 10000 objects array, on both method, to see the different of between them by time, CPU and RAM.
Feel free to clone the git.
$ node gen
es6 map vs lodash map speed
As the table above shows, map() in ES6 performance more or less as same as Lodash, in term of CPU, Memory or Handling time.
Thanks to correcting the experiment mistake, by Samuel Rouse and Zachary Leighton. Requiring Lodash module should have been considered.
— https://github.com/wahengchang/lodash-vs-es6