Number() vs parseInt() vs plus vs bitwise (v14)

Revision 14 of this benchmark created on


Test runner

Ready to run.

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

Revisions

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