I\'m looking for the most efficient way to calculate the minimum number of bytes needed to store an integer without losing precision.
e.g. int: 10 = 1 byte
That will work at near-top-speed everywhere.
I'm rather confused as to why a large hash would even be wanted. If a 4-byte hash works, why not just use it always? Excepting cryptographic uses, who has hash tables with more then 232 buckets anyway?