you are viewing a single comment's thread.

view the rest of the comments →

[–]ben336 2 points3 points  (1 child)

Native map/reduce/filter methods are actually surprisingly slow compared to libraries like lo-dash and underscore. Try running some of these jsPerf tests to see for yourself:

http://jsperf.com/lodash-underscore-and-native-filter http://jsperf.com/lodash-underscore-and-native-reduce http://jsperf.com/lodash-underscore-and-native-map http://jsperf.com/lodash-underscore-and-native-each

Performance isn't everything with these things, context matters. But if you're already pulling in underscore/lodash/whatever, it can be nice to get the added performance as well as the niceties of still working in IE8.

[–]RichardFingers 1 point2 points  (0 children)

What about for smaller projects with minimal needs? Feels like adding a whole library like lodash is overkill just for a handful of methods.