Number() vs parseInt() vs plus vs bitwise (v40)

Revision 40 of this benchmark created on


Test runner

Ready to run.

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

Revisions

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