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:
 
var users = [{
        'user': 'fred',
        'age': 48
    },
    {
        'user': 'barney',
        'age': 36
    },
    {
        'user': 'fred',
        'age': 40
    },
    {
        'user': 'barney',
        'age': 34
    }
];
Tests:
  • Lodash

     
    _.sortBy(users, [function(o) { return o.age; }]);
  • ramda

     
    const byAge = R.ascend(R.compose(R.prop('age')));
    R.sort(byAge, users);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Lodash
    ramda

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:132.0) Gecko/20100101 Firefox/132.0
Firefox 132 on Mac OS X 10.15
View result in a separate tab
Test name Executions per second
Lodash 2522298.2 Ops/sec
ramda 715261.9 Ops/sec