Comparison of comparisons (v2)

Revision 2 of this benchmark created by Timothy Gu on


Setup

var test1   = "test text"
      , testnum = 132013223;

Test runner

Ready to run.

Testing in
TestOps/sec
== String (true)
(test1=="test text");
ready
=== String (true)
(test1==="test text");
ready
== String (false)
(test1=="not test text");
ready
=== String (false)
(test1==="not test text");
ready
== Number (true)
(testnum == 132013223);
ready
=== Number (true)
(testnum === 132013223);
ready
== Number (false)
(testnum == 13201322);
ready
=== Number (false)
(testnum === 13201322);
ready

Revisions

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