isNaN vs typeof vs something else (v4)

Revision 4 of this benchmark created on


Preparation HTML

<script>
  var a = NaN;
</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.