I am using GUID (128 bit) as a key into a hashing function.
Then for by table size I chose 16
so the function is like
hash(guid) mod 16
which gives me the partition I need to use.
The feedback I am getting is to do something like this
Guid (without dashes so essentially a number) mod 100,000 or higher or simply prime number like 17
Reasons mentioned is:
Using mod 16
with just GUID number will use only its last 4 bits so it exposes to bais. Using 17 will not.
There is any concrete math behind this ? Because 17 is 10001 and 16 is 10000 ??
If my hash
function is murmur64 then can I argue that the hash(guid) % 16
will be good enough for a better distribution ?