Tests:
  • concat

    AخA
     
    let arr1 = new Array(5000).fill(1234567890);
    const arr2 = new Array(5000).fill(1234567890);
    arr1 = arr1.concat(arr2);
  • prototype push

     
    let arr1 = new Array(5000).fill(1234567890);
    const arr2 = new Array(5000).fill(1234567890);
    Array.prototype.push.apply(arr1,arr2);
  • push spread

     
    let arr1 = new Array(5000).fill(1234567890);
    const arr2 = new Array(5000).fill(1234567890);
    arr1.push(...arr2);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    concat
    prototype push
    push spread

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36
Chrome 85 on Mac OS X 10.15.6
View result in a separate tab
Test name Executions per second
concat 29339.3 Ops/sec
prototype push 13982.5 Ops/sec
push spread 4339.3 Ops/sec