pv-arrayitera

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
pv-arrayitera
function foo() {
var a=[];
a[1]='a';
a[5]='b';
a[500001]='c';
a[123] = 'd';
a[12663] = 'e';
a[10023] = 'f';
a[123] = 'g';
a[123] = 'h';

var j=100129384;

for(i in a){
if (a[i]!='c'){
j*=j;
} else {
j+=10;
}
}
return j;
}
foo();
pending…
pv-objitera
function foo() {
var a={};
a[1] = 'a';
a[5] = 'b';
a[500001] = 'c';
a[123] = 'd';
a[12663] = 'e';
a[10023] = 'f';
a[123] = 'g';
a[123] = 'h';
var j=100129384;

for(i in a){
if (a[i]!='c'){
j*=j;
} else {
j+=10;
}
}
return j;
}
foo();
pending…

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

Compare results of other browsers

0 comments

Add a comment