Number() vs parseInt() vs plus vs bitwise (v72)

Revision 72 of this benchmark created by Namikaze Ray aka Pendechosne on


Setup

var a="132684574";

Test runner

Ready to run.

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

Revisions

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