Math.round vs Bitwise (v60)

Revision 60 of this benchmark created on


Description

Rounding in all form possible

Test runner

Ready to run.

Testing in
TestOps/sec
Bitwise <<
(5792/100 + .5) << 0;
ready
Math.round
Math.round(5792/100);
ready
parseInt
parseInt(5792/100 + .5, 10);
ready
Bitwise |
(5792/100 + .5) | 0;
ready
Bitwise >>
(5792/100 + .5) >> 0;
ready
~~
~~(5792/100 + .5)
ready

Revisions

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