Set variable vs check before set

Benchmark created by rxl on


Setup

var setting = false;

Test runner

Ready to run.

Testing in
TestOps/sec
Set
setting = true;
ready
Check before set
if(setting === false) {
  setting = true;
}
ready

Revisions

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