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
- v13-0005-WIP-a-safer-way-to-accumulate-a-single-struct-me.patch (text/x-patch) patch v13-0005
- v13-0006-Add-benchmarks-for-hashing.patch (text/x-patch) patch v13-0006
- v13-0004-Use-fasthash-for-the-search-path-cache.patch (text/x-patch) patch v13-0004
- v13-0002-Use-fasthash-for-pgstat_hash_hash_key.patch (text/x-patch) patch v13-0002
- v13-0003-Add-optimized-string-hashing-to-hashfn_unstable..patch (text/x-patch) patch v13-0003
- v13-0001-Add-inlineable-incremental-hash-functions-for-in.patch (text/x-patch) patch v13-0001
On Thu, Jan 4, 2024 at 10:01 AM jian he <jian.universality@gmail.com> wrote: > > I still cannot git apply your patch cleanly. in I don't know why you're using that -- the git apply man page even says "Use git-am(1) to create commits from patches generated by git-format-patch(1) and/or received by email." Or, if that fails, use "patch". > http://cfbot.cputube.org/ i cannot find your patch. > ( so, it might be that I test based on incomplete information). > but only hashfn_unstable.h influences bench_hash/bench_hash.c. > > so I attached the whole patch that I had git applied, that is the > changes i applied for the following tests. Well, aside from the added text-editor detritus, it looks like this has everything except v11-0008, without which I still get improvement for the pgstat hash. > Model name: Intel(R) Core(TM) i5-14600K > The following is tested with another machine, also listed machine spec below. > I tested 3 times, the results is very similar as following: > select * from bench_cstring_hash_aligned(100000); 4705.686 ms > select * from bench_cstring_hash_unaligned(100000); 6835.753 ms > select * from bench_pgstat_hash(100000); 2678.978 ms > select * from bench_pgstat_hash_fh(100000); 6199.017 ms > select * from bench_string_hash(100000); 847.699 ms I was fully prepared to believe something like 32-bit Arm would have difficulty with 64-bit shifts/multiplies etc., but this makes no sense at all. In this test, on my machine, HEAD's pgstat_hash is 3x faster than HEAD's "strlen + hash_bytes", but for you it's 3x slower. To improve reproducibility, I've added the .sql files and a bench script to v13. I invite you to run bench_hash.sh and see if that changes anything. v13 also - adds an assert that aligned and unaligned C string calculations give the same result - properly mixes roleid in the namespace hash, since it's now convenient to do so (0005 is an alternate method) - removes the broken makefile from the benchmark (not for commit anyway)