Floor Performance (v3)

Revision 3 of this benchmark created by Paul H Howells on


Description

added a couple more bitwise based tests to Sam’s jsperf.com/floor-performance/2

Test runner

Ready to run.

Testing in
TestOps/sec
Math.floor
eval("var b = Math.floor(10.5);");
ready
pipe |0 floor
eval("var b = (10.5)|0");
ready
~~ floor
eval("var b = ~~(10.5)");
ready
>> floor
eval("var b = (10.5)>>0");
ready

Revisions

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