Tests:
  • Array.push

    AخA
     
    let array = new Array(1000000).fill(0);
    array.push(1);
  • Spread operator

     
    let array = new Array(1000000).fill(0);
    array = [...array, 1];
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array.push
    Spread operator

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 months ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Chrome 130 on Linux
View result in a separate tab
Test name Executions per second
Array.push 106.3 Ops/sec
Spread operator 87.0 Ops/sec