HTML Preparation code:
x
 
1
<script src='https://cdn.jsdelivr.net/g/lodash@4(lodash.min.js+lodash.fp.min.js)'></script>
2
var fp = _.noConflict();
3
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:
  • Native

     
    array.reduce(reducer, '');
  • Lodash

     
    _.reduce(array, reducer, '');
  • Lodash FP

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

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Native
    Lodash
    Lodash FP

    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; rv:101.0) Gecko/20100101 Firefox/101.0
Firefox 101 on Mac OS X 10.15
View result in a separate tab
Test name Executions per second
Native 5046794.5 Ops/sec
Lodash 3730402.8 Ops/sec
Lodash FP 2001135.8 Ops/sec