Re:Ten Ways to Check if an Integer Is a Power Of Two in C
by Someone on Tuesday July 26, 2011 @01:02PM
(#2808312)
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.
[ Parent
| on HN ]
There are no comments on this comment yet.