3 ms·
Why do we need to use a bounded size hash function?
by gizmo686 11y ago
Why do we need to use a bounded size hash function?
- SilasX 11y agoYou don't: that's the other alternative. But if you allow the hash table to resize as you increase the hash function (that is, adapt the function to one that has a larger output), then that's still not constant with respect to the table size. Computing a larger output requires logarithmically more operations to compute the hash, assuming you use one with the same well-mixedness properties. A hash function with 5 bits of output needs more operations than one with 2 bits of output.