Loop comparisons

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
For loop decreasing (let)
let test = 0

let len = 100000
for (let x = len; x > 0; x--) 
{
	test++;
}
ready
For loop decreasing (var)
let test = 0

let len = 100000
for (var x = len; x > 0; x--) 
{
	test++;
}
ready
For loop increasing (let)
let test = 0

let len = 100000
for (let i = 0; i < len; i++) {
	test++;
}
ready
While loop
let test = 0

let i = 100000
while (i--) {
	test++;
}
ready

Revisions

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