tilde vs floor (v6)

Revision 6 of this benchmark created on


Description

Comparison between ~~ and Math.floor

Preparation HTML

<script>
  var x = 3.14;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
tildes
var y = ~~x;
ready
floor
var y = Math.floor(x);
ready
bitwise or
var y = x | 0;
ready
shift right
var y = x >> 0;
ready

Revisions

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