Re: [POC] verifying UTF-8 using SIMD instructions
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: John Naylor <john.naylor@enterprisedb.com>
Cc: Amit Khandekar <amitdkhan.pg@gmail.com>,
Heikki Linnakangas <hlinnaka@iki.fi>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2021-07-21T15:29:21Z
Lists: pgsql-hackers
Attachments
- 0001-XXX-Make-SIMD-code-more-platform-neutral.txt (text/plain)
- 0002-XXX-Add-ARM-NEON-support-for-UTF-8-validation.txt (text/plain)
On Sat, Mar 13, 2021 at 4:37 AM John Naylor <john.naylor@enterprisedb.com> wrote: > On Fri, Mar 12, 2021 at 9:14 AM Amit Khandekar <amitdkhan.pg@gmail.com> wrote: > > I was not thinking about auto-vectorizing the code in > > pg_validate_utf8_sse42(). Rather, I was considering auto-vectorization > > inside the individual helper functions that you wrote, such as > > _mm_setr_epi8(), shift_right(), bitwise_and(), prev1(), splat(), > > If the PhD holders who came up with this algorithm thought it possible to do it that way, I'm sure they would have. In reality, simdjson has different files for SSE4, AVX, AVX512, NEON, and Altivec. We can incorporate any of those as needed. That's a PG15 project, though, and I'm not volunteering. Just for fun/experimentation, here's a quick (and probably too naive) translation of those helper functions to NEON, on top of the v15 patch.
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Simplify coding style of is_valid_ascii()
- 6b41a1579bd3 16.0 landed
-
Apply auto-vectorization to the inner loop of numeric multiplication.
- 88709176236c 14.0 cited