Hacker News new | ask | show | jobs
by nopurpose 1141 days ago
TLDR; hash the hash with fast function, like fibonacci hash which is just single multiplication by a constant, then take lower bits as your bucket index.
1 comments

No, you take the highest bits. The product is a fixed-point real fraction. The integer part has overflowed out of the machine word. 0..(2**64-1) represents 0.0<=x<1.0 Picking the n highest bits is like multiplying with 2**n and using the integer result.