Equality operators with the same types (v4)

Revision 4 of this benchmark created by Kyle Simpson on


Description

Test for == and === with the same operand types.

Preparation HTML

<script>
  var foo = 12,
      bar = 12,
      baz = "12";
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Non-strict equal
foo == bar;
ready
Strict equal
foo === bar;
ready
different types, coercion
foo == baz;
ready
different types, no coercion
foo === baz;
ready

Revisions

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