floor (v14)

Revision 14 of this benchmark created on


Preparation HTML

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

Test runner

Ready to run.

Testing in
TestOps/sec
Math.floor
y = Math.floor(x);
ready
bitwise or
y = 0|x;
ready
left bitshift
y = x<<0;
ready
right bitshift
y = x>>0;
ready
bitwise not
y = ~~x;
ready
Math.trunc
y = Math.trunc(x);
ready

Revisions

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