pgsql: Speed up generation of Unicode hash functions.

From: John Naylor <john(dot)naylor(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Speed up generation of Unicode hash functions.
Date: 2021-08-12 19:52:39
Message-ID: E1mEGkp-0004Lm-Dm@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Speed up generation of Unicode hash functions.

Sets of Unicode keys are picky about the primes used when generating
a perfect hash function for them. Callers can spend many seconds
iterating through all the possible combinations of candidate
multipliers and seeds to find one that works.

Unicode updates typically happen only once a year, but it still makes
development and testing of Unicode scripts unnecessarily slow. To fix,
iterate over the primes in the innermost loop. This does not change
any existing functions checked into the tree.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ba958299eaf3d2f55bddb8efb037091d14ca6fd0

Modified Files
--------------
src/tools/PerfectHash.pm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tomas Vondra 2021-08-12 20:09:47 pgsql: Use appropriate tuple descriptor in FDW batching
Previous Message John Naylor 2021-08-12 12:55:11 pgsql: Fix grammar mistake in hash index README