~~ vs >> vs parseInt (bitwise operators) (v5)

Revision 5 of this benchmark created by Taner on


Test runner

Ready to run.

Testing in
TestOps/sec
NOT
~~2.353753958395;
ready
SHIFT
2.353753958395 >> 0;
ready
parseInt
parseInt(2.353753958395, 10);
ready
floor
Math.floor(2.353753958395);
ready
AND
2.353753958395 | 0;
ready
toFixed
2.353753958395.toFixed();
ready
toPrecision(1)
2.353753958395.toPrecision(1);
ready

Revisions

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