bool-vs-int-2 (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script>
  var a = true;
  var b = false;
  var c = 1;
  var d = 0;
  
  function bluh() {}
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Conditional - Bool
if (a) bluh();
if (b) bluh();
ready
Conditional - Int
if (c == 1) bluh();
if (d == 1) bluh();
ready
Conditional - Int 2
if (c) bluh();
if (d) bluh();
ready
Conditional - Int 3
if (c !== 0) bluh();
if (d !== 0) bluh();
ready
Conditional - Bool 2
if (a===true) bluh();
if (b===true) bluh();
ready

Revisions

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