for with array lenght

JavaScript performance comparison

Test case created

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
normal
var a = [];
for(var i = 0; i < 100000; i ++){
a.push(i);
}

var c = 0;
for(var j = 0; j < a.length; j++){
c++;
}
pending…
length outside
var a = [];
for(var i = 0; i < 100000; i ++){
a.push(i);
}

var c = 0;
var l = a.length;
for(var j = 0; j < l; j++){
c++;
}
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