String compare VS number compare (v6)

Revision 6 of this benchmark created on


Description

What is faster? Comparing a number or comparing a string?

Preparation HTML

<script>
  var a1 = 'asdf',
      a2 = '...',
      a3 = 'asdf';
  var b1 = 123,
      b2 = 999999,
      b3 = 123;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Number
b1 == 123
ready
String
a1 == 'asdf'
ready
Number ===
b1 === 123
ready
String ===
a1 === 'asdf'
ready

Revisions

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