Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you could time travel (backwards) to before you got the inputs that needed to be stored in a hash table, you could come up with a hash function that would not have any collisions with your inputs, and also know how big your initial hash table would need to be. This is kind of what the GP comment was saying, that the values to be put into the hash are biased to be the values we will be storing there.

My point is that even though we can't predict future or talk with our past self, we can sometimes know enough about the class of inputs (the string's contents, or the values in the key fields of a struct) that we can learn a more special hash function with low collision rate and high density. At very large scale this can have a measurable effect.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: