Orsom Peters: Bitwise Binary Search: Elegant and Fast
-
This post did not contain any content.
-
-
This post did not contain any content.
Bitwise operations are elegant in the same way nunchucks are elegant: they are impressive and versatile in the hands of a master but inflict a lot of self-bruises in the hands of novices.
-
Bitwise operations are elegant in the same way nunchucks are elegant: they are impressive and versatile in the hands of a master but inflict a lot of self-bruises in the hands of novices.
Even in the hands of experts they can be dangerous. One of the most respected programmers at my company wrote an implementation of memory that had an off by one error when bit indexing for alignment checking.
Everything worked fine until you had 16-bit relatively aligned src and dest and happened to be targeting uncached memory.
-