Script Preparation code:
AخA
 
var params = [];
for (var i = 0; i < 500; i++) {
  params.push(i + '_hi there'); 
  params.push(true);
  params.push(i);
}
Tests:
  • Array.prototype.slice

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

     
    var other = [ ...params ]
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array.prototype.slice
    spread operator

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Chrome 75 on Mac OS X 10.14.5
View result in a separate tab
Test name Executions per second
Array.prototype.slice 14324.9 Ops/sec
spread operator 815207.4 Ops/sec