HTML Preparation code:
AخA
 
1
<script src='https://cdn.jsdelivr.net/g/lodash@4(lodash.min.js+lodash.fp.min.js)'></script>
Script Preparation code:
 
var fp = _.noConflict();
var array =  ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'];
var reducer = (r, x) => r + x;
Tests:
  • Lodash reduce

     
    _.reduce(array, reducer, '')
  • Lodash fp reduce

     
    fp.reduce(reducer, '', array)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Lodash reduce
    Lodash fp reduce

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0
Firefox 132 on Windows
View result in a separate tab
Test name Executions per second
Lodash reduce 4855498.0 Ops/sec
Lodash fp reduce 1683441.0 Ops/sec