OR vs if

Benchmark created on


Teardown


    var caseTrue = false
    
        
    function sum() {
      var j = 100;
      var i = 10;
      var sum;
    }
  

Test runner

Ready to run.

Testing in
TestOps/sec
OR
caseTrue || sum();
ready
IF
if (!caseTrue) {
  sum();
}
ready

Revisions

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