bool-vs-int-2 (v10)

Revision 10 of this benchmark created by Yanis Benson on


Preparation HTML

<script>
  var a = true;
  var b = false;
  var c = 1;
  var d = 0;
  var LOL = 100;

  function bluh() { LOL = (LOL + 2) >> 1; }
</script>

Test runner

Ready to run.

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

Revisions

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