Array .concat() vs. .push() (v2)

Revision 2 of this benchmark created by Julio A. on


Preparation HTML

<script>
  var arr = [1, 2, 3];
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
.push()
arr.push(4);
arr.push(5);
arr.push(6);
ready
.concat()
arr.concat([4, 5, 6]);
ready

Revisions

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