HTML Preparation code:
x
 
1
2
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
 
var obj = {
  a: 1,
  b: 2,
  c: 3,
}
Tests:
  • lodash forOwn

     
    _.forOwn(obj, (a) => {console.log(a)});
  • Keys and then forEach

     
    Object.keys(obj).forEach((a) => {console.log(a)});
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    lodash forOwn
    Keys and then forEach

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0
Firefox 81 on Windows
View result in a separate tab
Test name Executions per second
lodash forOwn 18309.7 Ops/sec
Keys and then forEach 20243.3 Ops/sec