Hi,

On 2023-11-20 22:37:47 -0800, Jeff Davis wrote:
> 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.

I think it'd be a bad idea to make it always on - there's plenty cases where
it just would make things slower because the hit rate is low. A equal
comparison is far from free.

I am not quite sure this kind of cache best lives in simplehash - ISTM that
quite often it'd be more beneficial to have a cache that you can test more
cheaply higher up.

Greetings,

Andres Freund


Reply via email to