isNaN vs typeof vs something else (v3)

Revision 3 of this benchmark created by shesek on


Preparation HTML

<script>
  var a = 123456789;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
isNaN
!isNaN(a)
ready
typeof
typeof a === 'number';
ready
equal to self
+a === +a
ready

Revisions

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