Script Preparation code:
x
 
const list = [20, 10, 50, 33, 1, 5, 90, 45, 39, 77, 11];
function built_in_sort(arr) {
    return arr.sort((a, b) => a - b);
}
//Insertion sort
function insertion_sort(ary) {
    for (var i = 1, l = ary.length; i < l; i++) {
        var value = ary[i];
        for (var j = i - 1; j >= 0; j--) {
            if (ary[j] <= value)
                break;
            ary[j + 1] = ary[j];
        }
        ary[j + 1] = value;
    }
    return ary;
}
Tests:
  • Built in sort

     
    built_in_sort([20, 10, 50, 33, 1, 5, 90, 45, 39, 77, 11])
  • Insertion sort

     
    insertion_sort([20, 10, 50, 33, 1, 5, 90, 45, 39, 77, 11])
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Built in sort
    Insertion sort

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 8 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Chrome 127 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Built in sort 3713366.5 Ops/sec
Insertion sort 14889111.0 Ops/sec