Re: [PHP4BETA] Zend hash functions enchantments [PATCH]
| From: | Jerry Lundström | Date: | Thu, 06 Apr 2000 12:15:15 +0000 |
| Subject: | Re: [PHP4BETA] Zend hash functions enchantments [PATCH] | ||
| References: | 1 2 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-13222@lists.php.net to get a copy of this message | ||
On Thu, 06 Apr 2000 00:46:00 -0700, August Zajonc <azajonc@POMONA.EDU> wrote:
>Consider the case of a hash value which has 10 digits (numbers). Now you
>have a string which only takes numbers, which is eleven charchters long.
>There are more possible values then hash values. Where do the extra values
>go? Duplicate hash values.
>
>The whole point of a hash is to create a much shorter representation of
>complex data. It is likely then that the total range of the hash is less
>then the range of the data. Duplicate hash values are virtually certain...
>
I know that duplicated hash values are a fact but we are talking about
duplicated hash values with string of the exact same size!
If the hash function is at the best it should spread out the entry evenly
across the hash table and that doesnt seam to be the case here. I am not
trying to change the hash functions and if it aint possible in some way to
get a faster search for hash entry with keys rather then string I just
have to go back to string.
--
Jerry Lundström:<jerry.lundstrom@citat.se>
mobile+46.739.876053:phone+46.31.7107244:fax+46.31.7107201
citat.solutions:Kronhusgatan.9:SE-411.05.Göteborg:Sweden
www.citat.se/solutions