or or if

Benchmark created by Jameson on


Preparation HTML

<script>
  function A() {
     this.a || 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10;
    }
    
    function B() {
     if(!this.a) 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10;
    }
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
A
A() === 5;
ready
B
B() === 5;
ready

Revisions

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