3 ms·
However perfect it is, it can only guarantee no collisions if the size of the strings you're hashing is equal or lower than the hash size. In this house, we ob
by speakeron 8y ago
However perfect it is, it can only guarantee no collisions if the size of the strings you're hashing is equal or lower than the hash size.
In this house, we obey the pigeonhole principle.
- jcranmer 8y agoIt can do better, if the input is not "every possible string." A perfect hash of the strings representing 32-bit unsigned integers can compress strings up to 10 bytes long into 4 bytes of data.