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

From John Naylor
Subject Re: Change GUC hashtable to use simplehash?
Date
Msg-id CANWCAZavg7xvP6dEaB1AdnovbJoXQo2c3N=_VvuANvQeqn6w8w@mail.gmail.com
Whole thread Raw
In response to Re: Change GUC hashtable to use simplehash?  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
On Wed, Nov 29, 2023 at 9:59 PM Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>
> I didn't understand what you meant by the above. Did you wack around
> fast-hash, or who did?

I turned it into an init/accum/final style (shouldn't affect the
result), and took out the input length from the calculation (will
affect the result and I'll look into putting it back some other way).

> Who switched mixing/final functions; compared to
> what?

Sorry for the confusion. I didn't change those, I was speaking hypothetically.

> In any case, +1 on the implementation you had in the patch at a quick
> glance.
>
> Let's also replace the partial murmurhash implementations we have in
> hashfn.h with this. It's a very similar algorithm, and we don't need two.

Thanks for taking a look! For small fixed-sized values, it's common to
special-case a murmur-style finalizer regardless of the algorithm for
longer inputs. Syscache combines multiple hashes for multiple keys, so
it's probably worth it to avoid adding cycles there.



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal: possibility to read dumped table's name from file
Next
From: Tom Lane
Date:
Subject: Re: SSL tests fail on OpenSSL v3.2.0