2 ms·
How so? Looks like filter builds a new array, and so does map? And both while-loops over the entire input? https://github.com/lodash/lodash/blob/master/filter.
by e12e 5y ago
How so? Looks like filter builds a new array, and so does map? And both while-loops over the entire input?
https://github.com/lodash/lodash/blob/master/filter.js https://github.com/lodash/lodash/blob/master/filter.js
https://github.com/lodash/lodash/blob/master/map.js https://github.com/lodash/lodash/blob/master/map.js
With a quick search I found this:
https://hackernoon.com/es6-lodash-native-javascript-nodejs-example-tutorial-map-function-functional-programming-performance-speed-69645e613049 https://hackernoon.com/es6-lodash-native-javascript-nodejs-e...
Which seems to indicate little difference?