Script Preparation code:
AخA
 
var myArray = [ "hello", true, 7 ]
Tests:
  • slice without any argument

     
    var other = myArray.slice();
  • spread operator

     
    var other = [ ...myArray ]
  • concat into empty array

     
    [].concat(myArray);
  • slice(0)

     
    var other = myArray.slice(0);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    slice without any argument
    spread operator
    concat into empty array
    slice(0)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Chrome 69 on Windows
View result in a separate tab
Test name Executions per second
slice without any argument 5204005.5 Ops/sec
spread operator 3983811.8 Ops/sec
concat into empty array 2072068.9 Ops/sec
slice(0) 4293930.0 Ops/sec