Get Time
Search | Watch Thread  |  My Post History  |  My Watches  |  User Settings
View: Flat (newest first)  | Threaded  | Tree
Previous Thread  |  Next Thread
Java static library for bit twiddling (Long and Integer Object) | Reply
I think this is relevant, because the article mentioned Gcc built-in libraries, similar things also exist in java (although I guess many of you already knew about this, I post it anyway) :

Functions like
bitCount, numberOfTrailingZeros, highestOneBit, lowestOneBit, reverse, rotateRight,
is provided.

Quote from the documentation:

Implementation note: The implementations of the "bit twiddling" methods (such as highestOneBit and numberOfTrailingZeros) are based on material from Henry S. Warren, Jr.'s Hacker's Delight, (Addison Wesley, 2002)