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

Revision 6 of this benchmark created by void_0 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
modulo
2.353753958395 - 2.353753958395 % 1
ready

Revisions

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