isNaN func vs.""+isnan

Benchmark created on


Preparation HTML

<script>
  x = "str";
  y = 43;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
isNaN function
if(isNaN(x));
if(isNaN(y));
ready
"" + NaN
if(x+"" === "NaN");
if(y+"" === "NaN");
ready

Revisions

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