modulo vs bitwise (v15)

Revision 15 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
modulo
var t = 0;
for (var c = 0; c < 128; c++) {
    if (c < 65 || (c-1) % 32 > 25) {
       t += 3;
    }
    else {
       t += 4;
    }
}
 
ready
bitwise
var t = 0;
for (var c = 0; c < 128; c++) {
    if (c < 0x41 || ((c-1) & 0x1F) > 0x19) {
       t += 3;
    }
    else {
       t += 4;
    }
}
ready

Revisions

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