Tests:
  • Array.prototype.concat

    AخA
     
    const a = Array(1000).fill('a');
    const b = Array(1000).fill('b');
    const ab = a.concat(b);
  • Spread operator

     
    const a = Array(1000).fill('a');
    const b = Array(1000).fill('b');
    const ab = [...a, ...b];
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array.prototype.concat
    Spread operator

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 23 days ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Chrome 135 on Linux
View result in a separate tab
Test name Executions per second
Array.prototype.concat 319415.2 Ops/sec
Spread operator 178494.3 Ops/sec