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
Ответ на
Список
Дерево обсуждения
simplehash: SH_OPTIMIZE_REPEAT for optimizing repeated lookups of the same key Jeff Davis <pgsql@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 Jeff Davis <pgsql@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 Andres Freund <andres@anarazel.de>
Re: simplehash: SH_OPTIMIZE_REPEAT for optimizing repeated lookups of the same key Jeff Davis <pgsql@j-davis.com>
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
Дата:
От: Peter Eisentraut
Дата:
Сообщение: Re: remaining sql/json patches
FAQ