performance of parseInt() (v18)

Revision 18 of this benchmark created on


Teardown


    var x = '008';
  

Test runner

Ready to run.

Testing in
TestOps/sec
parseInt(x)
parseInt(x)
ready
parseInt(x, 10)
parseInt(x, 10)
ready
+x
+x
ready
~~x
~~
x
ready
parseFloat(x)
parseFloat(x)
ready
Number(x)
Number(x)
ready
x*1
x * 1
ready
Math.floor(x)
Math.floor(x)
ready
Math.ceil(x)
Math.ceil(x)
ready
Math.round()
Math.round(x)
ready
x-0
x - 0
ready
x-0.0
x - 0.0
ready

Revisions

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