Number() vs parseInt() vs plus vs bitwise (v83)

Revision 83 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Number Constructor
Number("-1542365486598745");
ready
parseInt
parseInt("-1542365486598745");
ready
Plus operator
+"-1542365486598745";
ready
Bitwise >> (right shift)
"-1542365486598745" >> 0;
ready
Multiply (force cast)
"-1542365486598745" * 1;
ready
not not
~~"-1542365486598745";
ready
parseInt no base
parseInt("-1542365486598745");
ready
Divide (force cast)
"-1542365486598745" / 1;
ready

Revisions

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