lodash each & lodash map
Date tested:
4 years ago
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36
Test name
Executions per second
lodash each
13405.1 Ops/sec
lodash map
13298.9 Ops/sec
Benchmark definition (click to collapse):
HTML Preparation code:
<script src='https://cdn.jsdelivr.net/npm/lodash@4.17.10/lodash.min.js'></script>
Script Preparation code:
var value = [{a: 30310}, {b: 100303}, {c: 3040494}, {d: 6542321}, {e: 13123531}]
Tests:
lodash each
_.each(value, function(v,i) {console.log(v)})
lodash map
_.map(value, function(v,i) {console.log(v)})
Open this result on MeasureThat.net