string vs int compare (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script>
  n1 = 404;
  n2 = 405;
  s1 = '404';
  s2 = '405';
  
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
string
if (s1 < s2) return true;
 
ready
int
if (n1 < n2) return true;
 
ready
coverting (control)
if (s1 != s2) return true;
ready
converting
if (parseInt(s1) != n2) return true;
ready

Revisions

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