For While (v3)

Revision 3 of this benchmark created on


Description

is for faster than while

Preparation HTML

<script>
  var testlength = 1000000;
  var currentloop = 0;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
While Test
while (currentloop <= testlength) {
  currentloop++;
}
ready
Do While
do {
  currentloop++;
}
while (currentloop <= testlength);
ready
For Test
for (currentloop; currentloop <= testlength; currentloop++) {}
ready

Revisions

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