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

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: simplehash: SH_OPTIMIZE_REPEAT for optimizing repeated lookups of the same key
Дата
Msg-id 20231121045015.GC3521465@nathanxps13
обсуждение исходный текст
Ответ на 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  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
On Mon, Nov 20, 2023 at 06:12:47PM -0800, Jeff Davis wrote:
> The caller could do something similar, so this option is not necessary,
> but it seems like it could be generally useful. It speeds things up for
> the search_path cache (and is an alternative to another patch I have
> that implements the same thing in the caller).

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.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: Hide exposed impl detail of wchar.c
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Simplify if/else logic of walsender CreateReplicationSlot