type cast (v16)

Revision 16 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
parseInt
var a = parseInt("10000000.1212", 10);
var b = parseInt("1000", 10);
 
ready
Left Shift
var a = "10000000.1212" << 0;
var b = "1000" << 0;
 
ready
- operator
var a = "10000000.1212" - "0";
var b = "1000" - "0";
 
ready
|0 operator
var a = "10000000.1212"|0;
var b = "1000"|0;
 
ready
Right Shift
var a = "10000000.1212" >> 0;
var b = "1000" >> 0;
 
ready
Zero-fill right shift
// Doesn't work for negatives
var a = "10000000.1212" >>> 0;
var b = "1000" >>> 0;
 
ready

Revisions

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