Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Someone
on July 26, 2011
|
parent
|
context
|
favorite
| on:
Ten Ways to Check if an Integer Is a Power Of Two ...
I haven't tried, but I would expect doing the linear search in the reverse direction will be faster than binary search. It, on average, inspects just two values; binary search does about five.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: