Conditional order

Benchmark created on


Setup

const arr = [1,2,3,4,5,6];

Test runner

Ready to run.

Testing in
TestOps/sec
Right
for (const num of arr) {
	if (num % 2 === 0 || num === 3) {
		return false
	}
	
	return true
}
ready
Left
for (const num of arr) {
	if (num === 3 || num % 2 === 0) {
		return false
	}
	
	return true
}
ready

Revisions

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