Rounding down (v111)

Revision 111 of this benchmark created by Chen-Pang He on


Description

Rounding down in all form possible

Setup

var a = 89.938 / 293.3;
    var b = 83784 / 9289.2;
    var c = 7 / 60;

Test runner

Ready to run.

Testing in
TestOps/sec
Math.floor
Math.floor(a);
Math.floor(b);
Math.floor(c);
ready
Bitwise OR
a | 0;
b | 0;
c | 0;
ready
Bitwise shift
a >> 0;
b >> 0;
c >> 0;
ready
Double NOT
~~a;
~~b;
~~c;
ready

Revisions

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