HTML Preparation code:
AخA
 
1
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js"></script>
Script Preparation code:
 
window.obj = {};
var arr = []
for (var i = 0, len = 100000; i < len; i++) { 
    arr.push(i);
}
Tests:
  • Lodash

     
    _.reduce(arr, (acc, val) => {
      return acc + val;
    }, {})
  • Native

     
    arr.reduce((acc, val) => {
      return acc + val;
    }, {})
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Lodash
    Native

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Chrome 106 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Lodash 224.0 Ops/sec
Native 205.0 Ops/sec