Re: speed up verifying UTF-8

From: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
To: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>
Subject: Re: speed up verifying UTF-8
Date: 2021-08-04 11:22:57
Message-ID: CAFBsxsFaXOgdqnHmXb91mK0_q=-vn4Mt61KVDww2y5=BHK3XFQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> If we have only 16 bytes in the input, it still seems to be faster to use
SSE, even though it's called through a function pointer on x86. I didn't
test the DFA path, but I don't think the conclusion would be different.
I'll include the 16 threshold next time I need to update the patch.

v22 attached, which changes the threshold to 16, with a few other cosmetic
adjustments, mostly in the comments.

--
John Naylor
EDB: http://www.enterprisedb.com

Attachment Content-Type Size
v22-0001-Add-fast-paths-for-validating-UTF-8-text.patch application/octet-stream 63.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2021-08-04 11:43:33 Re: Skipping logical replication transactions on subscriber side
Previous Message Masahiko Sawada 2021-08-04 10:59:55 Re: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION