Concat vs Splice (v7)

Revision 7 of this benchmark created on


Description

Compare repeated concat to splice

Test runner

Ready to run.

Testing in
TestOps/sec
Concat
var a = [];
for(var i = 0; i < 1000; i++) {
  a = a.concat([i]);
}
ready
Splice
var a = [];
for(var i = 0; i < 1000; i++) {
   a.splice(i, 0, i);
}
ready

Revisions

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