Tests:
  • Spread operator

    x
     
    const imageIds = [];
    for(let i=0; i<8/2; i++) {
        const value = Math.floor(Math.random() * 100)
        imageIds.push(value);
    }
    var other = [...imageIds, ...imageIds]
  • Push

     
    const imageIds = [];
    for(let i=0; i<8/2; i++) {
        const value = Math.floor(Math.random() * 100)
        imageIds.push(value);
        imageIds.push(value);
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Spread operator
    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; rv:61.0) Gecko/20100101 Firefox/61.0
Firefox 61 on Windows
View result in a separate tab
Test name Executions per second
Spread operator 4457487.0 Ops/sec
Push 6652247.5 Ops/sec