repeat for vs array method2

JavaScript performance comparison

Test case created by

Test runner

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

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
Array
return Array(11).join("+");
pending…
Plus For
var text = "";
for (var i = 0; i < 10; i++) {
  text += "+";
}
return text;
pending…
Minus For
var text = "";
for (var i = 10; i > 0; i--) {
  text += "+";
}
return text;
pending…
Plus While
var text = "";
var i = 0;
while (i++ < 10) {
  text += "+";
}
return text;
pending…
Minus While
var text = "";
var i = 0;
while (i--) {
  text += "+";
}
return text;
pending…
Plus Do while
var text = "";
var i = 0;
do {
  text += "+";
} while (i++ < 10);
return text;
pending…
Minus do while
var text = "";
var i = 0;
do {
  text += "+";
} while (i--);
return text;
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.

0 Comments