concat push

Benchmark created on


Setup

var a = [1, 2],
        b = [3, 4];

Test runner

Ready to run.

Testing in
TestOps/sec
concat
a = a.concat(b)
ready
push1
for (var i = 0, n = b.length; i < n; ++i)
a.push(b[i]);
ready
push2
a.push(3);
a.push(4);
ready
push-apply
a.push.apply(a, b);
ready

Revisions

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