[PATCH v1 1/1] PostgreSQL Patch: AVX-Optimized ASCII Validation

Started by Pickett, Eshe N4 months ago2 messages
Jump to latest
#1Pickett, Eshe N
eshe.n.pickett@intel.com

PostgreSQL Patch: AVX-Optimized ASCII Validation

This patch series introduces Intel AVX2 and AVX-512 optimized ASCII validation
for PostgreSQL's UTF-8 processing pipeline, providing significant performance
improvements for text-heavy workloads through vectorized string validation.

Originally implemented by Matthew Sterrett. Submitting for consideration.

Regards,

Eshé N. Pickett (she/her)
Cloud Software Development Engineer
Intel Corp.

Attachments:

postgresql-avx-ascii-validation-submission-v1.patchapplication/octet-stream; name=postgresql-avx-ascii-validation-submission-v1.patchDownload+315-3
#2John Naylor
john.naylor@enterprisedb.com
In reply to: Pickett, Eshe N (#1)
Re: [PATCH v1 1/1] PostgreSQL Patch: AVX-Optimized ASCII Validation

On Tue, Nov 4, 2025 at 2:45 PM Pickett, Eshe N <eshe.n.pickett@intel.com> wrote:

This patch series introduces Intel AVX2 and AVX-512 optimized ASCII validation

for PostgreSQL's UTF-8 processing pipeline, providing significant performance

improvements for text-heavy workloads through vectorized string validation.

We already use SSE2/Neon here, and and a good compiler can unroll 2
vectors to work on 32-bytes per loop iteration. Profiles of COPY FROM
should not show ASCII validation to be a large part of the profile
anymore. The bottlenecks are most likely elsewhere. I don't believe
this is worth it.

--
John Naylor
Amazon Web Services