Number() vs parseInt() vs plus vs bitwise on a "float" (v38)

Revision 38 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Bitwise NOT
~~"13268949.39";
ready
parseInt with base argument
parseInt("13268949.39", 10);
ready
Bitwise OR
"13268949.39" | 0
ready
minus 0
"13268949.39" - 0;
ready
Plus operator
+"13268949.39";
ready
Bitwise >> (right shift)
"13268949.39" >> 0;
ready
Multiply (force cast)
"13268949.39" * 1;
ready
Number Constructor
Number("13268949.39");
ready
parseInt
parseInt("13268949.39");
ready

Revisions

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