Number() vs parseInt() vs plus vs bitwise (v21)

Revision 21 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Number Constructor
Number("1326894939");
ready
parseInt
parseInt("1326894939");
ready
Plus operator
+"1326894939";
ready
Bitwise >> (right shift)
"1326894939" >> 0;
ready
Multiply (force cast)
"1326894939" * 1;
ready
not not
~~"1326894939";
ready
parseInt("1326894939", 10);
ready

Revisions

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