Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Math.floor vs Bitwise OR vs Unsinged Right Shift
(version: 1)
Math.floor vs Bitwise OR vs Unsinged Right Shift
Comparing performance of:
Math.floor vs Bitwise vs unsigned right shift
Created:
10 months ago
by:
Guest
Jump to the latest result
Tests:
Math.floor
var x = 65531 / 65536 * 13000; x = Math.floor(x);
Bitwise
var x = 65531 / 65536 * 13000; x = x | 0;
unsigned right shift
var x = 65531 / 65536 * 13000; x = x >>> 0;
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Math.floor
Bitwise
unsigned right shift
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
4 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0 Safari/605.1.15
Browser/OS:
Safari 26 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Math.floor
544307712.0 Ops/sec
Bitwise
546841152.0 Ops/sec
unsigned right shift
550236864.0 Ops/sec
Related benchmarks:
floor() vs trunc() vs bitwise hacks (~~, >> 0, etc)
Math.floor vs bitwise <<
Math floor vs | vs shift
fast floor vs floor js
fast floor vs floor js vs unsafe floor
toFixed vs toPrecision vs Math.round() vs bitwise, also trunc, floor
Integer division test
IPv4 number to dotted decimal
floor() vs trunc() vs bitwise hacks (~~, >> 0, etc) vs round()
Comments
Confirm delete:
Do you really want to delete benchmark?