Number() vs parseInt() vs plus vs bitwise (v94)

Revision 94 of this benchmark created on


Setup

var XXX = "1326894939.5";

Test runner

Ready to run.

Testing in
TestOps/sec
Number Constructor
Number(XXX);
ready
parseFloat
parseFloat(XXX);
ready
Plus operator
+XXX;
ready
Multiply (force cast)
XXX * 1;
ready
parseFloat with base argument
parseFloat(XXX, 10);
ready
minus 0
XXX - 0;
ready

Revisions

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