Re: Division in dynahash.c due to HASH_FFACTOR

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Division in dynahash.c due to HASH_FFACTOR
Дата
Msg-id 603568.1600479056@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Division in dynahash.c due to HASH_FFACTOR  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Division in dynahash.c due to HASH_FFACTOR
Список pgsql-hackers
I wrote:
> ISTM that getting rid of the division obviates the concern that the
> nentries condition is too expensive,

Also, we could make it slightly cheaper yet, by changing the condition
to

            hctl->freeList[0].nentries > (long) (hctl->max_bucket)

ie drop the +1.  I'd argue that this is actually a more faithful
rendition of the previous condition, since what we had before was
basically

            hctl->freeList[0].nentries >= (long) (hctl->max_bucket + 1)

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Division in dynahash.c due to HASH_FFACTOR
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pg_logging_init() can return ENOTTY with TAP tests