Script Preparation code:
AخA
 
var array = new Array(10000).fill(1)
var toConcat = new Array(5000).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: 2 days ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:137.0) Gecko/20100101 Firefox/137.0
Firefox 137 on Mac OS X 10.15
View result in a separate tab
Test name Executions per second
Array.prototype.concat 147925.8 Ops/sec
spread operator 17280.6 Ops/sec