concat VS push.apply

Benchmark created on


Setup

arr1 = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]
arr2 = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]

Test runner

Ready to run.

Testing in
TestOps/sec
Concat
arr1 = arr1.concat(arr2)
console.log(arr1)
ready
Array.prototype.push.apply
Array.prototype.push.apply(arr1, arr2)
console.log(arr1)
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.