lodash each & lodash map & native forEach no console log
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
3177035.0 Ops/sec
lodash map
2962847.8 Ops/sec
native forEach
14627950.0 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) {})
lodash map
_.map(value, function(v,i) {})
native forEach
value.forEach(function(v,i) {})
Open this result on MeasureThat.net