Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Conversions in Javascript. Parent comment
The reason why some of them is so fast is because the constant expression is evaluated to a constant, so instead of doing a conversion in the test, the already converted number is returned.
Use this test instead: http://jsperf.com/parse-number-from-string
There are no comments on this comment yet.
The reason why some of them is so fast is because the constant expression is evaluated to a constant, so instead of doing a conversion in the test, the already converted number is returned.
Use this test instead: http://jsperf.com/parse-number-from-string