Re: Change GUC hashtable to use simplehash? - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Change GUC hashtable to use simplehash?
Date
Msg-id 3820f030fd008ff14134b3e9ce5cc6dd623ed479.camel@j-davis.com
Whole thread Raw
In response to Re: Change GUC hashtable to use simplehash?  (John Naylor <johncnaylorls@gmail.com>)
Responses Re: Change GUC hashtable to use simplehash?
List pgsql-hackers
On Mon, 2023-12-18 at 13:39 +0700, John Naylor wrote:
> For now just two:
> v10-0002 is Jeff's change to the search path cache, but with the
> chunked interface that I found to be faster.

Did you consider specializing for the case of an aligned pointer? If
it's a string (c string or byte string) it's almost always going to be
aligned, right?

I hacked up a patch (attached). I lost track of which benchmark we're
using to test the performance, but when I test in a loop it seems
substantially faster.

It reads past the NUL byte, but only to the next alignment boundary,
which I think is OK (though I think I'd need to fix the patch for when
maxalign < 8).

Regards,
    Jeff Davis


Attachment

pgsql-hackers by date:

Previous
From: "Li, Yong"
Date:
Subject: Re: Proposal to add page headers to SLRU pages
Next
From: John Naylor
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum