Loops (v155)

Revision 155 of this benchmark created on


Preparation HTML

<script>
  var arr = new Array(100);
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Old ’n’ busted for loop
for (var i = 0; i < arr.length; ++i) {
 arr[i];
};
ready
Old ’n’ busted for loop, caching the length
for (var i = 0, len = arr.length; i < len; ++i) {
 arr[i];
};
ready

Revisions

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