performance of parseInt() (v12)

Revision 12 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
parseInt(x)
parseInt('00004567')
ready
parseInt(x, 10)
parseInt('00004567', 10)
ready
+x
+'00004567'
ready
~~x
~~'00004567'
ready
parseFloat(x)
parseFloat('00004567')
ready
Number(x)
Number('00004567')
ready
new Number(x)
// Please note that new primitives are dangerous
new Number('4')
ready
Math.floor(x)
Math.floor('00004567')
ready
Math.ceil(x)
Math.ceil('4')
ready
Math.round()
Math.round('00004567')
ready
x-0
'00004567'-0
ready
x-0.0
'00004567'-0.0
ready

Revisions

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