modulo vs bitwise (v19)

Revision 19 of this benchmark created by yjo on


Test runner

Ready to run.

Testing in
TestOps/sec
modulo
var results = [];
var x = 0x76543210
while (x > 0) {
    results.push(x % 16);
    x /= 16;
}
ready
bitwise
var results = [];
var x = 0x76543210
while (x > 0) {
    results.push(x & 0xF);
    x >>>= 4;
}
ready

Revisions

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