Re: Improve CRC32C performance on SSE4.2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: John Naylor <johncnaylorls(at)gmail(dot)com>, Andy Fan <zhihuifan1213(at)163(dot)com>, "Devulapalli, Raghuveer" <raghuveer(dot)devulapalli(at)intel(dot)com>, Jesper Pedersen <jesperpedersen(dot)db(at)gmail(dot)com>, Tomas Vondra <tomas(at)vondra(dot)me>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Shankaran, Akash" <akash(dot)shankaran(at)intel(dot)com>
Subject: Re: Improve CRC32C performance on SSE4.2
Date: 2025-06-23 15:29:32
Message-ID: 3366258.1750692572@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Nathan Bossart <nathandbossart(at)gmail(dot)com> writes:
> On Mon, Jun 23, 2025 at 11:10:45AM -0400, Tom Lane wrote:
>> I was imagining just including _mm512_zextsi128_si512() in the
>> code being tested during configure, so that we fall back to
>> the non-AVX-512 code if the compiler is too old to have it.
>> I don't really feel a need to work harder than that.

> Sorry, my note wasn't clear. Right now, the configure test uses
> _mm512_castsi512_si128(), so we can't just do a simple s/cast/zext. We'll
> need to make a slightly bigger modification to the test to make sure the
> zext intrinsics are understood. I agree that we needn't work any harder
> than that.

The code still uses _mm512_castsi512_si128, so I think removing it
from the configure snippet might not be bright. I adapted what's
there now to get the attached, which builds successfully on my old
compiler. I still need to check it on a newer compiler.

regards, tom lane

Attachment Content-Type Size
test-for-new-AVX-intrinsic-too.patch text/x-diff 1.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2025-06-23 15:32:26 Re: [PoC] Federated Authn/z with OAUTHBEARER
Previous Message Christoph Berg 2025-06-23 15:20:12 Re: pgsql: Introduce pg_shmem_allocations_numa view