Math.floor vs Math.round vs parseInt vs Bitwise (v153)

Revision 153 of this benchmark created on


Description

Rounding in all form possible

Test runner

Ready to run.

Testing in
TestOps/sec
Math.floor
Math.floor(1190.000112324324);
ready
Math.round
Math.round(1190.000112324324);
ready
parseInt / 10
parseInt(1190.000112324324 / 10);
ready
parseInt
parseInt(1190.000112324324);
ready
Bitwise
1190.000112324324 >> 0
ready
Bit OR
1190.000112324324 | 0
ready

Revisions

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