Script Preparation code:
AخA
 
var n = 100000;
Tests:
  • Array constructor - 100000 items

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

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

Suite status: <idle, ready to run>

Previous results

Experimental features:

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

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0
Firefox 136 on Windows
View result in a separate tab
Test name Executions per second
Array constructor - 100000 items 72.8 Ops/sec
Array literal (assign by index) - 100000 items 90.2 Ops/sec