Script Preparation code:
AخA
 
var array = Array.from(Array(1000).keys());
var array2 = Array.from(Array(20).keys())
Tests:
  • arrayUnshift123

     
    array2.forEach((v) => array.unshift(v));
  • arrayConcat123

     
    array = array2.concat(array)
  • arraySpread123

     
    array = [...array2, ...array]
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    arrayUnshift123
    arrayConcat123
    arraySpread123

    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; rv:80.0) Gecko/20100101 Firefox/80.0
Firefox 80 on Windows
View result in a separate tab
Test name Executions per second
arrayUnshift123 18201.4 Ops/sec
arrayConcat123 16.1 Ops/sec
arraySpread123 11.9 Ops/sec