Comparison of comparisons

JavaScript performance comparison

Revision 9 of this test case created by Lil Devil

Preparation code


      
      <script>
Benchmark.prototype.setup = function() {
  var teststr = "test text",
      testnum = 132013223,
      teststrnum = "132013223";

};
</script>

Test runner

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

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
== String (true)
(teststr == "test text");
pending…
=== String (true)
(teststr === "test text");
pending…
== String (false)
(teststr == "not test text");
pending…
=== String (false)
(teststr === "not test text");
pending…
== Number (true)
(testnum == 132013223);
pending…
=== Number (true)
(testnum === 132013223);
pending…
== Number (false)
(testnum == 13201322);
pending…
=== Number (false)
(testnum === 13201322);
pending…
string == number (true)
(teststrnum == testnum);
pending…
string === number (true)
(teststrnum === testnum);
pending…
string == number (false)
(teststr == testnum);
pending…
string === number (false)
(teststr === testnum);
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.

0 Comments