length

JavaScript performance comparison

Revision 41 of this test case created

Preparation code

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

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
l=length
for(var i=0,l=arr.length;i<l;i++)emptyFn(arr[i]);
 
pending…
length
for(var i=0;i<arr.length;i++)emptyFn(arr[i]);
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment