length (v42)

Revision 42 of this benchmark created on


Preparation HTML

<script>
var arr=[],l=10E5;
while(l--){
arr.push(l);
}
function emptyFn(r){return r;}
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
l=length
for(var i=0,l=arr.length;i<l;i++)emptyFn(arr[i]);
 
ready
length
for(var i=0;i<arr.length;i++)emptyFn(arr[i]);
ready
while
var l =arr.length;while(l--)emptyFn(arr[l]);
ready
while2
var l =arr.length,i=l-1;while(l--)emptyFn(arr[i-l]);
ready

Revisions

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