Re: speed up unicode normalization quick check

John Naylor <john.naylor@enterprisedb.com>

From: John Naylor <john.naylor@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Michael Paquier <michael@paquier.xyz>, Masahiko Sawada <masahiko.sawada@2ndquadrant.com>, Mark Dilger <mark.dilger@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-10-19T16:12:00Z
Lists: pgsql-hackers

Attachments

On Mon, Oct 19, 2020 at 10:38 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:

> John Naylor <john.naylor@enterprisedb.com> writes:
> > On Mon, Oct 19, 2020 at 2:16 AM Peter Eisentraut <
> > peter.eisentraut@2ndquadrant.com> wrote:
> >> Could you adjust the generation script so that the resulting header file
> >> passes the git whitespace check?  Check the output of
> >> git show --check 80f8eb79e24d9b7963eaf17ce846667e2c6b6e6f
>
> > My git manual says:
> > ...
> > The above would mean we should have errors for every function whose
> > parameters are lined with the opening paren, so I don't see why it would
> > fire in this case. Is the manual backwards?
>
> Probably not, but our whitespace rules are not git's default.
> See .gitattributes at the top level of a git checkout
>

I see, I should have looked for that when Michael mentioned it. We could
left-justify instead, as in the attached. If it were up to me, though, I'd
just format it like pgindent expects, even if not nice looking. It's just a
bunch of numbers.

-- 
John Naylor
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Commits

  1. Review format of code generated by PerfectHash.pm

  2. Fix compilation warning in unicode_norm.c

  3. Use perfect hash for NFC and NFKC Unicode Normalization quick check

  4. Improve set of candidate multipliers for perfect hash function generation

  5. Further improve pgindent's list of file exclusions.