Script Preparation code:
AخA
 
var data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0];
Tests:
  • slice

     
    var copy = data.slice(3, 8);
    var copya = data.slice(3, 8);
  • push

     
    var copy = [];
    var copya = [];
    for (var i = 3; i < 8; i++) {
      copy.push(data[i]);
      copya.push(data[i]);
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    slice
    push

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
slice 12334964.0 Ops/sec
push 3024109.8 Ops/sec