pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Naylor <john.naylor@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Speed up generation of Unicode hash functions.
Date: Thu, 12 Aug 2021 19:52:39 +0000
Message-ID: <E1mEGkp-0004Lm-Dm@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1mEGkp-0004Lm-Dm@gemulon.postgresql.org>
Permalink:  ../E1mEGkp-0004Lm-Dm@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mEGkp-0004Lm-Dm@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: john.naylor@postgresql.org
  Subject: Re: pgsql: Speed up generation of Unicode hash functions.
  In-Reply-To: <E1mEGkp-0004Lm-Dm@gemulon.postgresql.org>
  References: <E1mEGkp-0004Lm-Dm@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox