Tests:
  • Set-length array

    AخA
     
    let arr = Array(1000).fill(undefined).map(e => Math.floor(Math.random()*1000000+1));
  • Array.push

     
    let arr = [];
    for (i=0; i<1000001; i++){arr.push(Math.floor(Math.random()*1000000+1))}
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Set-length array
    Array.push

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Chrome 69 on Windows
View result in a separate tab
Test name Executions per second
Set-length array 836.4 Ops/sec
Array.push 1.1 Ops/sec