Artemko
1 min readMar 8, 2019

--

Let’s be completely honest here:

import * as _ from "lodash";let i;const bigArray = [];for (i = 0; i < 1000000; i++) {bigArray.push({ number: i });}let start = Date.now();bigArray.map(x => x + 2);console.log("native   " + (Date.now() - start));start = Date.now();_.map(bigArray, x => x + 2);console.log("lodash   " + (Date.now() - start));

native 207

lodash 234

--

--

Artemko
Artemko

Written by Artemko

Software Engineer with experience.

No responses yet