HTML Preparation code:
x
 
1
2
<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) {return v})
  • lodash map

     
    _.map(value, function(v,i) {return v})
  • native forEach

     
    value.forEach(function(v,i) {return v})
  • native map

     
    value.map(function(v,i) {return v})
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    lodash each
    lodash map
    native forEach
    native map

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 years ago)
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
Chrome 80 on Mac OS X 10.15.3
View result in a separate tab
Test name Executions per second
lodash each 3166767.8 Ops/sec
lodash map 2980112.2 Ops/sec
native forEach 14033724.0 Ops/sec
native map 10801183.0 Ops/sec