Tests:
  • Array constructor - 10 items

    x
     
    var n = 10;
    var arr = new Array();
    for (var i = 0; i < n; i++) {
      arr.push(i);
    }
  • Array literal (assign by index) - 10 items

     
    var n = 10;
    var arr = [];
    for (var i = 0; i < n; i++) {
      arr.push(i);
    } 
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array constructor - 10 items
    Array literal (assign by index) - 10 items

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36
Chrome 89 on Mac OS X 11.2.3
View result in a separate tab
Test name Executions per second
Array constructor - 10 items 4695157.5 Ops/sec
Array literal (assign by index) - 10 items 26121056.0 Ops/sec