Re: Change GUC hashtable to use simplehash?

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: John Naylor <johncnaylorls(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Gurjeet Singh <gurjeet(at)singh(dot)im>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Change GUC hashtable to use simplehash?
Date: 2023-11-21 17:00:25
Message-ID: d05f536d2ba9a963735d903f5b8faa170ab6fa91.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2023-11-21 at 16:42 +0700, John Naylor wrote:
> The strlen call required for hashbytes() is not free.

Should we have a hash_string() that's like hash_bytes() but checks for
the NUL terminator itself?

That wouldn't be inlinable, but it would save on the strlen() call. It
might benefit some other callers?

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-11-21 17:16:41 Re: Partial aggregates pushdown
Previous Message Andres Freund 2023-11-21 16:51:38 Re: simplehash: SH_OPTIMIZE_REPEAT for optimizing repeated lookups of the same key