Math.round vs bitmath

Benchmark created on


Preparation HTML

<script>
  var x = Math.PI;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Math.round
Math.round(x * 10) / 10
ready
Bitmath
(0 | 10 * x) / 10
ready

Revisions

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