isNaN(input) vs Number.isNaN(Number(input)) (version: 0)
benchmark for using:
- implicit conversion of string to number -> isNaN(input)
vs
- strictness conversion of string to number and after it compare with NaN -> Number.isNaN(Number(input))
Comparing performance of: Implicit conversion test vs Strictness conversion test
Memory measurements supported only in Chrome.
For precise memory measurements Chrome must be launched with --enable-precise-memory-info flag.
More information: Monitoring JavaScript Memory
Test case name
Result
Implicit conversion test
Strictness conversion test
Fastest:N/A
Slowest:N/A
Latest run results:
Run details: (Test run date:
10 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36