HTML Preparation code:
AخA
 
1
<script src="//cdnjs.cloudflare.com/ajax/libs/ramda/0.25.0/ramda.min.js"></script>
2
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js"></script>
Script Preparation code:
 
function double(n) {
    return n*2;
}
var data = [...Array(20)].map((v, idx) => idx);
Tests:
  • Ramda

     
    R.compose(R.map(double), R.map(double), R.map(double), R.map(double))(data);
  • Array (native)

     
    data.map(double).map(double).map(double).map(double);
  • Lodash

     
    _(data).chain(_.map(double),_.map(double),_.map(double),_.map(double)).value();
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Ramda
    Array (native)
    Lodash

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:77.0) Gecko/20100101 Firefox/77.0
Firefox 77 on Mac OS X 10.15
View result in a separate tab
Test name Executions per second
Ramda 253825.9 Ops/sec
Array (native) 1533706.9 Ops/sec
Lodash 771794.9 Ops/sec