type cast (v7)

Revision 7 of this benchmark created by Mahdi on


Setup

var a = "10000000.1212"
    var b = "1000"

Test runner

Ready to run.

Testing in
TestOps/sec
parseInt
parseInt(a, 10);
parseInt(b, 10);
 
ready
parseFloat
parseFloat(a);
parseFloat(b);
 
ready
+ operator
+a;
+b;
 
ready
|0 operator
a|0;
b|0;
 
ready

Revisions

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