OR vs if (v3)

Revision 3 of this benchmark created by PlayMyCode on


Teardown


    var caseTrue = false
    
        
    function sum() {
      return 100 + 10;
    }
  

Test runner

Ready to run.

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

Revisions

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