Equality operators

JavaScript performance comparison

Revision 12 of this test case created

Info

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

Preparation code

<script>
  var baz0 = "12",
      baz1 = "12",
      buz0 = "13",
      obj0 = { 'foo' : 'bar' },
      obj1 = obj0,
      obk0 = { 'bar' : 'foo' };
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Equal strings
baz0 === baz1;
pending…
Non-equal strings
baz0 === buz0;
pending…
Equal objects
obj0 === obj1;
pending…
Non-equal objects
obj0 === obk0;
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment