Script Preparation code:
x
 
var array1 = Array(400).fill().map(() => Math.round(Math.random() * 40));
var array2 = Array(400).fill().map(() => Math.round(Math.random() * 40));
var array3 = Array(400).fill().map(() => Math.round(Math.random() * 40));
var array4 = Array(400).fill().map(() => Math.round(Math.random() * 40));
var array5 = Array(400).fill().map(() => Math.round(Math.random() * 40));
var allArrays = [array1, array2, array3, array4, array5];
Tests:
  • concat.apply

     
    var others = [].concat.apply([], allArrays);
  • flat

     
    var others = allArrays.flat()
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    concat.apply
    flat

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36
Chrome 101 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
concat.apply 1479548.5 Ops/sec
flat 7156.7 Ops/sec