=== vs == (v4)

Revision 4 of this benchmark created on


Preparation HTML

<script>
var a_bool = true;
var b_bool = false;
var a_int = 376421;
var b_int = 121231;
var a_string = "hello";
var b_string = 'goodbye';
var a_obj = { hello: 'goodbye' };
var b_obj = { hello: "is it me you're looking for?" };
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
=== (boolean)
(function() {
  a_bool === b_bool;
})();
ready
== (boolean)
(function() {
  a_bool == b_bool;
})();
ready
=== (number)
(function() {
  a_int === b_int;
})();
ready
== (number)
(function() {
  a_int == b_int;
})();
ready
=== (string)
(function() {
  a_string === b_string;
})();
ready
== (string)
(function() {
  a_string == b_string;
})();
ready
=== (Object)
(function() {
  a.obj === b.obj
})();
ready
== (Object)
(function() {
  a.obj == b.obj
})();
ready

Revisions

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