RE: Improve CRC32C performance on SSE4.2

From: "Devulapalli, Raghuveer" <raghuveer(dot)devulapalli(at)intel(dot)com>
To: John Naylor <johncnaylorls(at)gmail(dot)com>, Andy Fan <zhihuifan1213(at)163(dot)com>
Cc: Jesper Pedersen <jesperpedersen(dot)db(at)gmail(dot)com>, Nathan Bossart <nathandbossart(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-16 18:31:11
Message-ID: PH8PR11MB8286A89AF2B104044187E54DFB70A@PH8PR11MB8286.namprd11.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Attached is a simple reproducer. It passes with clang v16 -O0, but fails with 17 and 18 only when built with -O0.

Build command: clang main.c -O0

Hope this helps.
Raghuveer

> -----Original Message-----
> From: John Naylor <johncnaylorls(at)gmail(dot)com>
> Sent: Sunday, June 15, 2025 7:39 PM
> To: Andy Fan <zhihuifan1213(at)163(dot)com>
> Cc: Jesper Pedersen <jesperpedersen(dot)db(at)gmail(dot)com>; Nathan Bossart
> <nathandbossart(at)gmail(dot)com>; Tomas Vondra <tomas(at)vondra(dot)me>; Devulapalli,
> Raghuveer <raghuveer(dot)devulapalli(at)intel(dot)com>; 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
>
> On Sun, Jun 15, 2025 at 8:32 AM Andy Fan <zhihuifan1213(at)163(dot)com> wrote:
> >
> > Jesper Pedersen <jesperpedersen(dot)db(at)gmail(dot)com> writes:
> >
> > Hi,
> >
> > Thank you Nathan, Tomas and Jesper for the answers. The patch at [0]
> > works for me and I could work with master smoothly now.
>
> Pushed, thanks for testing! I'll do some more testing to see what versions/levels
> are affected and file a bug report, but it'll be a few days before I get to it.
>
> --
> John Naylor
> Amazon Web Services
>

Attachment Content-Type Size
main.c text/plain 2.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2025-06-16 18:39:59 Re: pglogical3 : support
Previous Message Tom Lane 2025-06-16 18:28:06 Re: 回复: Fix potential overflow risks from wcscpy and sprintf