Re: Change GUC hashtable to use simplehash?
John Naylor <johncnaylorls@gmail.com>
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Silence warning in older versions of Valgrind
- fde7c0164ea2 17.5 landed
- 0600d276d485 18.0 landed
-
Revert "Speed up tail processing when hashing aligned C strings, take two"
- 6555fe197914 17.3 landed
- 235328ee4ae4 18.0 landed
-
Speed up tail processing when hashing aligned C strings, take two
- a365d9e2e8c1 17.0 landed
-
Teach fasthash_accum to use platform endianness for bytewise loads
- 0c25fee35903 17.0 landed
-
Add macro to disable address safety instrumentation
- db17594ad73a 17.0 landed
-
Convert uses of hash_string_pointer to fasthash equivalent
- f956ecd0353b 17.0 landed
-
Speed up tail processing when hashing aligned C strings
- 07f0f6abfc7f 17.0 landed
-
Add helper functions for dshash tables with string keys.
- 42a1de3013ea 17.0 cited
-
Fix warnings in cpluspluscheck
- 257998508672 17.0 landed
-
Further cosmetic review of hashfn_unstable.h
- b83033c3cff5 17.0 landed
-
Simplify initialization of incremental hash state
- 9ed3ee5001b6 17.0 landed
-
Add optimized C string hashing
- 0aba2554409e 17.0 landed
-
Add inline incremental hash functions for in-memory use
- e97b672c88f6 17.0 landed
-
Make all Perl warnings fatal
- c5385929593d 17.0 cited
Attachments
- v6-0001-Vendor-fasthash.patch (text/x-patch) patch v6-0001
- v6-0003-Add-UINT64CONST-not-sure-when-we-actually-need-th.patch (text/x-patch) patch v6-0003
- v6-0004-Assert-that-the-incremental-fasthash-variants-giv.patch (text/x-patch) patch v6-0004
- v6-0002-Rewrite-fasthash-functions-using-a-homegrown-incr.patch (text/x-patch) patch v6-0002
- v6-0005-Demonstrate-fasthash32-with-pgstat_hash_hash_key.patch (text/x-patch) patch v6-0005
- v6-0007-Use-bytewise-fasthash-in-guc_name_hash.patch (text/x-patch) patch v6-0007
- v6-0006-Add-bytewise-interface.patch (text/x-patch) patch v6-0006
- v6-0009-Convert-GUC-hashtable-to-use-simplehash.patch (text/x-patch) patch v6-0009
- v6-0008-Casefold-lazily-in-guc_name_compare.patch (text/x-patch) patch v6-0008
- v6-0010-Use-inline-equality-function-for-guc-hash.patch (text/x-patch) patch v6-0010
- v6-0013-PoC-Get-rid-of-strlen-calls-when-using-HASH_STRIN.patch (text/x-patch) patch v6-0013
- v6-0011-Add-abiliy-to-case-fold-with-chunk-8-byte-interfa.patch (text/x-patch) patch v6-0011
- v6-0012-Use-chunk-interface-for-guc_name_hash.patch (text/x-patch) patch v6-0012
On Sat, Dec 9, 2023 at 3:32 AM Jeff Davis <pgsql@j-davis.com> wrote: > > On Wed, 2023-11-29 at 20:31 +0700, John Naylor wrote: > > Attached is a rough start with Andres's earlier ideas, to get > > something concrete out there. > > The implementation of string hash in 0004 forgot to increment 'buf'. Yeah, that was one of the bugs I mentioned. In v6, I fixed it so we get the right answer. 0001 pure copy of fasthash upstream 0002 keeps the originals for validation, and then re-implements them using the new incremental interfaces 0003 adds UINT64CONST. After writing this I saw that murmur64 didn't have UINT64CONST (and obviously no buildfarm member complained), so probably not needed. 0004 Assert that the original and incrementalized versions give the same answer. This requires the length to be known up front. 0005 Demo with pgstat_hash_hash_key, which currently runs 3 finalizers joined with hash_combine. Might shave a few cycles. 0006 Add bytewise interface for C strings. 0007 Use it in guc_name_hash 0008 Teach guc_name_cmp to case fold lazily I'll test these two and see if there's a detectable difference. Then each of these: 0009 Jeff's conversion to simplehash 0010 Use an inline equality function for guc nam. hash 0011/12 An experiment to push case-folding down inside fasthash. It's not great looking, but I'm curious if it makes a difference. 0013 Get rid of strlen in dynahash with default string hashing. I'll hold on to this and start a new thread, because it's off-topic and has some open questions. I haven't tested yet, but I want to see what CI thinks. > I tested using the new hash function APIs for my search path cache, and > there's a significant speedup for cases not benefiting from a86c61c9ee. > It's enough that we almost don't need a86c61c9ee. So a definite +1 to > the new APIs. Do you have a new test?