Loops

Benchmark created by Daniel Baulig (Ba. Thesis) on


Preparation HTML

<script>
  var c = 10000;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
for ++
var i;
for (i = 0; i < c; i += 1) {
 i;
}
ready
do-while ++
var i = 0;
do {
 i;
} while ((i += 1) < c);
ready
while ++
var i = 0;
while (i < c) {
 i += 1;
}
ready
for --
var i;
for (i = c; i > 0; i -= 1) {
 i;
}
ready
do-while --
var i = c;
do {
 i;
} while (i -= 1);
ready
while --
var i = c;
while (i) {
 i -= 1;
}
ready

Revisions

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

  • Revision 1: published by Daniel Baulig (Ba. Thesis) on