Number() vs parseInt() vs plus vs bitwise (v95)

Revision 95 of this benchmark created on


Setup

var XXX = 1326894939.5;

Test runner

Ready to run.

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

Revisions

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