Script Preparation code:
AخA
 
random = () => Array(50).fill(Math.floor(Math.random() * 9))
Tests:
  • Array.prototype.concat

     
    const arr1 = random();
    const arr2 = random();
    const other = arr1.concat(arr2);
  • spread operator

     
    const arr1 = random();
    const arr2 = random();
    const other = [ ...arr1, ...arr2]
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 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36 Edg/84.0.522.49
Chrome 84 on Windows
View result in a separate tab
Test name Executions per second
Array.prototype.concat 389387.5 Ops/sec
spread operator 358193.9 Ops/sec