caching length (v88)

Revision 88 of this benchmark created on


Setup

var arr = [];
    for (var i = 0; i < 1000; i++) {
      arr[i] = Math.random();
    }

Test runner

Ready to run.

Testing in
TestOps/sec
cached
for (var i = 0; i < arr.length; i++) {
  arr[i] *= 2;
}
ready
cached
for (var i in arr) {
  arr[i] *= 2;
}
ready
u wot m8
 
ready
while loop
 
ready

Revisions

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