Script Preparation code:
AخA
 
var array = new Array(10).fill(1)
var toConcat = new Array(10).fill(2)
Tests:
  • Array.prototype.concat

     
    var other = array.concat(toConcat);
  • spread operator

     
    var other = [ ...array, ...toConcat ]
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: 4 months ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131 on Linux
View result in a separate tab
Test name Executions per second
Array.prototype.concat 6169227.5 Ops/sec
spread operator 8347683.0 Ops/sec