tilde vs floor (v3)

Revision 3 of this benchmark created by Eric on


Description

Comparison between ~~ and Math.floor

Setup

var x = 3.14;
    var y = 0;

Test runner

Ready to run.

Testing in
TestOps/sec
tildes
y = ~~x;
ready
floor
y = Math.floor(x);
ready
parseInt
y = parseInt(x,10);
ready
bitwise or
y = x|0;
ready

Revisions

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