Re: speed up unicode normalization quick check - Mailing list pgsql-hackers

From Mark Dilger
Subject Re: speed up unicode normalization quick check
Date
Msg-id 9CC07801-6EC2-4166-8B4F-5B336BC99FCD@enterprisedb.com
Whole thread Raw
In response to Re: speed up unicode normalization quick check  (John Naylor <john.naylor@2ndquadrant.com>)
List pgsql-hackers

> On Sep 18, 2020, at 9:41 AM, John Naylor <john.naylor@2ndquadrant.com> wrote:
>
> Attached is version 4, which excludes the output file from pgindent,
> to match recent commit 74d4608f5. Since it won't be indented again, I
> also tweaked the generator script to match pgindent for the typedef,
> since we don't want to lose what pgindent has fixed already. This last
> part isn't new to v4, but I thought I'd highlight it anyway.

0001 looks ok to me.  The change is quite minor.  I reviewed it by comparing the assembly generated for perfect hash
functionsbefore and after applying the patch. 

For 0001, the assembly code generated from the perfect hash functions in src/common/keywords.s and
src/pl/plpgsql/src/pl_scanner.sdo not appear to differ in any performance significant way.  The assembly code generated
insrc/interfaces/ecpg/preproc/ecpg_keywords.s and src/interfaces/ecpg/preproc/c_keywords.s change enough that I
wouldn'ttry to compare them just by visual inspection. 

Compiled using  -g -O2

Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I'm attaching the diffs of the old and new assembly files, if anyone cares to look.



—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company




Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: factorial function/phase out postfix operators?
Next
From: Daniel Gustafsson
Date:
Subject: Memory allocation abstraction in pgcrypto