No Clue

Benchmark created by Carson Myers on


Preparation HTML

<script>
  var dest = new Array();
  var src = new Array(1, 2, 3, 4, 'five', 'six', 'seven', 'eight');
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
length, no var
for (i = 0; i < src.length; i++) {
 dest[i] = src[i];
}
ready
length var
for (var i = 0; i < src.length; i++) {
 dest[i] = src[i];
}
ready
for
for (i in src) {
 dest[i] = src[i];
}
ready
while
while (dest[dest.length] = src[dest.length]);
ready
while 2
var i = 0;
var j = 0;
while (dest[i++] = src[j++]);
ready

Revisions

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

  • Revision 1: published by Carson Myers on