Array Sort vs. lodash sort (v13)

Revision 13 of this benchmark created on


Preparation HTML

<script src="https://raw.github.com/bestiejs/lodash/v1.2.0/dist/lodash.min.js"></script>

Setup

var jsArrayTest = [];
    
    var limit = 10000;
    
    for (var i = limit; i > 0; i--) {
      jsArrayTest.push([i, 'foo', 'bar'])
    }
    
    var lodashArrayTest = [],
    aaa = [5,3,2,5,1];
    
    for (var i = limit; i > 0; i--) {
      lodashArrayTest.push([i, 'foo', 'bar'])
    }

Test runner

Ready to run.

Testing in
TestOps/sec
JS Array sort
jsArrayTest.sort();
ready
loDash
_.sortBy(aaa);
console.log(aaa);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.