Math.pow vs Bitwise (v4)

Revision 4 of this benchmark created on


Preparation HTML

<script>
  var a = 4,
      b = 2,
      c = 0,
      d = b * 2,
      Pow = Math.pow;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Math.pow
c = Pow(a, b);
ready
Bitwise
c = a << b;
ready
Multiply
c = a * d;
ready
Bitwise w/ const
c = a << 2;
ready
Multiply w/ const
c = a * 4;
ready
Multiply w/ float const
c = a * 4.0;
ready

Revisions

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