Script Preparation code:
AخA
 
function randomArray(length, max) {
    return Array.apply(null, Array(length)).map(function() {
        return Math.round(Math.random() * max);
    });
}
var arr = randomArray(10000, 15);
Tests:
  • Array.prototype.concat

     
    var other = arr.concat(1);
  • spread operator

     
    var other = [...arr, 1]
  • Push

     
    var other = arr.push(1);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array.prototype.concat
    spread operator
    Push

    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_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Chrome 76 on Mac OS X 10.14.6
View result in a separate tab
Test name Executions per second
Array.prototype.concat 15783.0 Ops/sec
spread operator 41593.8 Ops/sec
Push 11164103.0 Ops/sec