HTML Preparation code:
AخA
 
1
<script src="https://cdn.jsdelivr.net/lodash/4.16.0/lodash.min.js"></script>
2
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
 
var value = _.range(0, 1000)
Tests:
  • lodash.each

     
    _.each(value, function(v,i) {})
  • native

     
    value.forEach(function(v,i) {})
  • for loop

     
    for (var i = 0; i < value.length; i++) { }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    lodash.each
    native
    for loop

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Linux; Android 10; Pixel 4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Mobile Safari/537.36
Chrome Mobile 84 on Android
View result in a separate tab
Test name Executions per second
lodash.each 54787.6 Ops/sec
native 686136.0 Ops/sec
for loop 8507.9 Ops/sec