Re: [HACKERS] Hash Functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Hash Functions
Дата
Msg-id 31470.1502923267@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Hash Functions  (Kenneth Marshall <ktm@rice.edu>)
Список pgsql-hackers
Kenneth Marshall <ktm@rice.edu> writes:
> On Wed, Aug 16, 2017 at 05:58:41PM -0400, Tom Lane wrote:
>> ... In fact, on perusing the linked-to page
>> http://burtleburtle.net/bob/hash/doobs.html
>> Bob says specifically that taking b and c from this hash does not
>> produce a fully random 64-bit result.  He has a new one that does,
>> lookup3.c, but probably he hasn't tried to make that bit-compatible
>> with the 1997 algorithm.

> The updated hash functions that we currently use are based on Bob Jenkins
> lookup3.c and using b as the higher order bits is pretty darn good. I had
> lobbied to present the 64-bit b+c hash in the original work for similar
> reasons. We are definitely not using a lookup2.c version from 1997.

Oh --- I overlooked the bit about "Bob's 2006 update".  Really that
comment block should have been completely rewritten, rather than leaving
the original text there, especially since as it stands there are only
pointers to the old algorithm.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Atomics for heap_parallelscan_nextpage()
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [HACKERS] Function to move the position of a replication slot