Math.Floor vs ~~ vs 0|n (v15)

Revision 15 of this benchmark created by test on


Setup

var pi = 3.14;

Test runner

Ready to run.

Testing in
TestOps/sec
Math.floor
var final = Math.floor(pi);
ready
~~
var final = ~~pi;
ready
0|n
var final = 0|pi;
ready
pi>>0
var final = pi>>0;
ready

Revisions

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