r/javascript • • Jan 26 '16

You-Dont-Need-Lodash-Underscore

https://github.com/cht8687/You-Dont-Need-Lodash-Underscore
0 Upvotes

30 comments sorted by

View all comments

8

u/[deleted] Jan 26 '16

Native implematations are simply faster

In all browsers? What tests are you basing this on?

9

u/[deleted] Jan 26 '16

This is blatantly not true in the case of forEach. Native is substantially slower.

3

u/[deleted] Jan 26 '16 edited Jan 27 '16

1

u/[deleted] Jan 26 '16

Your link gives: 404 Not Found

0

u/[deleted] Jan 26 '16

Thanks bud. On mobile/lazy.

2

u/spiralxuk Jan 26 '16

It doesn't really support your position though, Lodash's each method isn't that much faster than native, and forEach is faster than all of the other libraries implementations. If you're calling it enough for that difference to matter, you should probably be hand-rolling a plain for loop anyway.

2

u/[deleted] Jan 26 '16

In practice, you're absolutely right. I was just refuting a claim that has since been removed. Overall, I agree with this write up, just not that specific claim.

I was very curious as to why that is when I found it out, this SO answer sums it up nicely.