concat vs push.apply (v7)

Revision 7 of this benchmark created on


Preparation HTML

<script>
  A = [];

for (var i = 0; i < 42; ++i)
  A[i] = {}; 
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
concat
var a = [1,2,3,4,5,6,7,8,9,10];
a = a.concat(A)
ready
push.apply
var a = [1,2,3,4,5,6,7,8,9,10];
a.push.apply(a, A)
ready

Revisions

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