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

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: simplehash: SH_OPTIMIZE_REPEAT for optimizing repeated lookups of the same key
Date: 2023-11-21 04:50:15
Message-ID: 20231121045015.GC3521465@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-11-21 04:57:28 Re: Simplify if/else logic of walsender CreateReplicationSlot
Previous Message Nathan Bossart 2023-11-21 04:39:43 Re: Hide exposed impl detail of wchar.c