bool-vs-int-vs-string (v11)

Revision 11 of this benchmark created on


Description

If statements.

Preparation HTML

<script>
    var a = true;
    var b = false;
    var c = 1;
    var d = 0;
    var e = "bluebird";
    var f = "someword";
    var g = "y";
    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 - Long Str
if (e === "bluebird") bluh();
if (f === "bluebird") bluh();
ready
Conditional - Short Str
if (g === "y") bluh();
if (f === "y") bluh();
ready

Revisions

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