slice vs concat (v3)

Revision 3 of this benchmark created on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
slice
var b = a.slice()
ready
concat
var b = a.concat();
ready
concat 2
var b = [].concat(a);
ready

Revisions

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