Script Preparation code:
x
 
 var someBigArray = [];
  var anotherArray = [];
  
  for (var i = 0; i < 10000; i++) {
    someBigArray.push(10);
    anotherArray.push(10);
  }
Tests:
  • push

     
    anotherArray.forEach(function(item) {
      someBigArray.push(item);
    })
  • cp

     
    var cp = someBigArray.slice(0);
    anotherArray.forEach(function(item) {
      cp.push(item);
    })
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    push
    cp

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 8 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36
Chrome 54 on Mac OS X 10.11.6
View result in a separate tab
Test name Executions per second
push 841.0 Ops/sec
cp 2.0 Ops/sec