While vs Do While

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
While loop
var i = 10000;
while (i > 0) {
  i -= 1;
}
ready
Do-While loop
var i = 10000;
do {
  i -= 1;
} while (i > 0);
ready

Revisions

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