Re: Change GUC hashtable to use simplehash?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Change GUC hashtable to use simplehash?
Дата
Msg-id 2334462.1700688476@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Change GUC hashtable to use simplehash?  (Andres Freund <andres@anarazel.de>)
Ответы Re: Change GUC hashtable to use simplehash?  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2023-11-22 15:56:21 -0500, Tom Lane wrote:
>> GUC names are just about always short, though, so I'm not sure you've
>> made your point?

> With short I meant <= 6 characters (32 / 5 = 6.x). After that you're
> overwriting bits that you previously set, without dispersing the "overwritten"
> bits throughout the hash state.

I'm less than convinced about the "overwrite" part:

+        /* Merge into hash ... not very bright, but it needn't be */
+        result = pg_rotate_left32(result, 5);
+        result ^= (uint32) ch;

Rotating a 32-bit value 5 bits at a time doesn't result in successive
characters lining up exactly, and even once they do, XOR is not
"overwrite".  I'm pretty dubious that we need something better than this.

            regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Change GUC hashtable to use simplehash?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] Changing references of password encryption to hashing