String compare VS number compare (v21)

Revision 21 of this benchmark created on


Preparation HTML

<script>
  var a1 = '21EC2020-3AEA-1069-A2DD-08002B30309D',
      a2 = '21EC2020-3AEA-1069-A2DD-08002B30309A',
      a3 = '21EC2020-3AEA-1069-A2DD-08002B30309D';
  var b1 = 123244343,
      b2 = 566435,
      b3 = 123244343;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
String
a1 == a2
ready
Number
b1 == b2
ready
String ===
a1 === a2
ready
Number ===
b1 === b2
ready
String (equal)
a1 == a3
ready
Number (equal)
b1 == b3
ready

Revisions

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