pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Use SSE2 in is_valid_ascii() where available.
2+ messages / 2 participants
[nested] [flat]

* pgsql: Use SSE2 in is_valid_ascii() where available.
@ 2022-08-26 08:59  John Naylor <john.naylor@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: John Naylor @ 2022-08-26 08:59 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Use SSE2 in is_valid_ascii() where available.

Per flame graph from Jelte Fennema, COPY FROM ... USING BINARY shows
input validation taking at least 5% of the profile, so it's worth trying
to be more efficient here. With this change, validation of pure ASCII is
nearly 40% faster on contemporary Intel hardware. To make this change
legible and easier to adopt to additional architectures, use helper
functions to abstract the platform details away.

Reviewed by Nathan Bossart

Discussion: https://www.postgresql.org/message-id/CAFBsxsG%3Dk8t%3DC457FXnoBXb%3D8iA4OaZkbFogFMachWif7mNnww%40ma...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/121d2d3d70ecdb2113b340c5f3b99a61341291af

Modified Files
--------------
src/common/wchar.c        |  7 +++---
src/include/mb/pg_wchar.h | 38 ++++++++++++++++++++++----------
src/include/port/simd.h   | 55 +++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 86 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pgsql: Use SSE2 in is_valid_ascii() where available.
@ 2022-08-26 09:59  John Naylor <john.naylor@enterprisedb.com>
  parent: John Naylor <john.naylor@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: John Naylor @ 2022-08-26 09:59 UTC (permalink / raw)
  To: John Naylor <john.naylor@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org

On Fri, Aug 26, 2022 at 3:59 PM John Naylor <john.naylor@postgresql.org> wrote:

> Per flame graph from Jelte Fennema, COPY FROM ... USING BINARY shows

For the archives: This is not correct syntax: should be COPY BINARY or
... WITH BINARY.

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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2022-08-26 09:59 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-08-26 08:59 pgsql: Use SSE2 in is_valid_ascii() where available. John Naylor <john.naylor@postgresql.org>
2022-08-26 09:59 ` John Naylor <john.naylor@enterprisedb.com>

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