Re: simplehash: SH_OPTIMIZE_REPEAT for optimizing repeated lookups of the same key

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: simplehash: SH_OPTIMIZE_REPEAT for optimizing repeated lookups of the same key
Дата
Msg-id fc4a5b83655bd80038e0a61042df32593d6e1ae3.camel@j-davis.com
обсуждение исходный текст
Ответ на Re: simplehash: SH_OPTIMIZE_REPEAT for optimizing repeated lookups of the same key  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: simplehash: SH_OPTIMIZE_REPEAT for optimizing repeated lookups of the same key  (Nathan Bossart <nathandbossart@gmail.com>)
Re: simplehash: SH_OPTIMIZE_REPEAT for optimizing repeated lookups of the same key  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Mon, 2023-11-20 at 22:50 -0600, Nathan Bossart wrote:
> I'm mostly thinking out loud here, but could we just always do this? 
> I
> guess you might want to avoid it if your SH_EQUAL is particularly
> expensive
> and you know repeated lookups are rare, but maybe that's uncommon
> enough
> that we don't really care.

I like that simplehash is simple, so I'm not inclined to introduce an
always-on feature.

It would be interesting to know how often it's a good idea to turn it
on, though. I could try turning it on for various other uses of
simplehash, and see where it tends to win.

The caller can also save the hash and pass it down, but that's not
always convenient to do.

Regards,
    Jeff Davis




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

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: Why is hot_standby_feedback off by default?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: remaining sql/json patches