If/else returning

Benchmark created by Harry on


Test runner

Ready to run.

Testing in
TestOps/sec
With else
if (Math.random() > 0.5) {
 return false;
} else {
 return true;
}
ready
Without else
if (Math.random() > 0.5) {
 return false;
}
return true;
ready

Revisions

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