Math.abs-vs-bitwise (v12)

Revision 12 of this benchmark created on


Description

Checking performance differences between Math.abs and using Bitwise manipulation.

Preparation HTML

<script>
var x = -5;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
Math.abs()
x < 0;
ready
bitwise
x = Math.abs(x);
ready

Revisions

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