Number() vs parseInt() vs plus vs bitwise on a "float"

JavaScript performance comparison

Revision 39 of this test case created by

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
Bitwise NOT
~~"13268949";
pending…
parseInt with base argument
parseInt("13268949", 10);
pending…
Bitwise OR
"13268949" | 0
pending…
minus 0
"13268949" - 0;
pending…
Number Constructor
Number("13268949");
pending…
parseInt
parseInt("13268949");
pending…
Plus operator
+"13268949";
pending…
Bitwise >> (right shift)
"13268949" >> 0;
pending…
Multiply (force cast)
"13268949" * 1;
pending…

Compare results of other browsers

Revisions

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

0 Comments