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
- fasthash32_nolen.txt (text/plain)
- fasthash32_pluslen.txt (text/plain)
- v9-0004-Assert-that-incremental-fasthash-variants-give-th.patch (application/x-patch) patch v9-0004
- v9-0006-Add-optional-tweak-to-finalizer.patch (application/x-patch) patch v9-0006
- v9-0002-Rewrite-fasthash-functions-using-a-homegrown-incr.patch (application/x-patch) patch v9-0002
- v9-0003-Fix-alignment-issue-in-the-original-fastash.patch (application/x-patch) patch v9-0003
- v9-0005-Remove-ULL.patch (application/x-patch) patch v9-0005
- v9-0001-Vendor-fasthash.patch (application/x-patch) patch v9-0001
I wrote: > > * v8 with chunked interface: > latency average = 555.688 ms > > This starts to improve things for me. > > * v8 with chunked, and return lower 32 bits of full 64-bit hash: > latency average = 556.324 ms > > This is within the noise level. There doesn't seem to be much downside > of using a couple cycles for fasthash's 32-bit reduction. > > * revert back to master from Dec 4 and then cherry pick a86c61c9ee > (save last entry of SearchPathCache) > latency average = 545.747 ms > > So chunked incremental hashing gets within ~2% of that, which is nice. > It seems we should use that when removing strlen, when convenient. > > Updated next steps: > * Investigate whether/how to incorporate final length into the > calculation when we don't have the length up front. > * Add some desperately needed explanatory comments. > * Use this in some existing cases where it makes sense. > * Get back to GUC hash and dynahash. For #1 here, I cloned SMHasher and was dismayed at the complete lack of documentation, but after some poking around, found how to run the tests, using the 32-bit hash to save time. It turns out that the input length is important. I've attached two files of results -- "nolen" means stop using the initial length to tweak the internal seed. As you can see, there are 8 failures. "pluslen" means I then incorporated the length within the finalizer. This *does* pass SMHasher, so that's good. (of course this way can't produce the same hash as when we know the length up front, but that's not important). The attached shows how that would work, further whacking around and testing with Jeff's prototype for the search path cache hash table. I'll work on code comments and get it polished.