bitwise and vs modulo (v2)

Revision 2 of this benchmark created on


Description

This testcase compares the performance off a modulo operation vs. a bitwise and check to determine whether a number is odd or not.

Preparation HTML

<script>
  var i;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
bitwise
i & 1
ready
modulo
i % 2
ready

Revisions

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