array concat

Benchmark created by David on


Setup

var n = 100;
    var a = new Array(n);
    var b = new Array(n);
    
    for (var i = 0; i < n; i++) a[i] = i; b[n-i-1] = i;

Test runner

Ready to run.

Testing in
TestOps/sec
array.concat
a = a.concat(b)
ready
array.push
Array.prototype.push.apply(a, b)
ready

Revisions

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

  • Revision 1: published by David on