Re: new hashing function
От | Tom Lane |
---|---|
Тема | Re: new hashing function |
Дата | |
Msg-id | 5621.1015181332@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | new hashing function (Neil Conway <nconway@klamath.dyndns.org>) |
Список | pgsql-hackers |
Neil Conway <nconway@klamath.dyndns.org> writes: > I've implemented Bob Jenkin's hash function for PostgreSQL; more > information on the hash function can be found at > http://burtleburtle.net/bob/hash/doobs.html One other thought --- presently, catcache.c is careful to use a prime size (257) for its hash tables, so that reducing the raw hash value mod 257 will allow all bits of the hash to contribute to determining the hash bucket number. This is necessary because of the relatively poor randomness of the hash functions. Perhaps with Jenkins' function we could dispense with that, and use a fixed power-of-2 size so that the division becomes a simple bit masking. On machines with slow integer division, this could be a nice speedup. Wouldn't help for hash indexes or joins though, since they don't use constant hashtable sizes. regards, tom lane
В списке pgsql-hackers по дате отправления: