Script Preparation code:
AخA
 
const count = 22000;
Tests:
  • Index - Initial Size Set

    x
     
    const count = 25000;
    let a = new Array(count);
    for(let i=0;i<count;i++)
    {
      a[i]=i;
    }
  • Index - Initial Size Not Set

     
    const count = 25000;
    let a = [];
    for(let i=0;i<count;i++)
    {
      a[i]=i;
    }
  • Array.push

     
    const count = 25000;
    let a = [];
    for(let i=0;i<count;i++)
    {
      a.push(i);
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Index - Initial Size Set
    Index - Initial Size Not Set
    Array.push

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
Chrome 60 on Mac OS X 10.12.6
View result in a separate tab
Test name Executions per second
Index - Initial Size Set 24431.0 Ops/sec
Index - Initial Size Not Set 7962.1 Ops/sec
Array.push 6855.3 Ops/sec