if twice vs if else

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
if twice
var foo = false;
var bar = false;
if (1<2) {
	foo = !foo
}
if (!(1<2)) {
	bar = !bar;
}
ready
if else
var foo = false;
var bar = false;
if (1<2) {
	foo = !foo
}
else {
	bar = !bar;
}
ready

Revisions

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