parseInt2 (v2)

Revision 2 of this benchmark created by Michael Mior on


Test runner

Ready to run.

Testing in
TestOps/sec
native parseInt
parseInt("12.5")
ready
hackish integer conversion
~~ (1 * "12.5")
ready
native parseInt with radix
parseInt("12.5", 10)
ready
Floor
Math.floor(+"12.5")
ready
+ hack without floor (different result)
+"12.5"
ready
~~
~~"12.5"
ready

Revisions

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