Re: Improve CRC32C performance on SSE4.2
John Naylor <johncnaylorls@gmail.com>
From: John Naylor <johncnaylorls@gmail.com>
To: "Devulapalli, Raghuveer" <raghuveer.devulapalli@intel.com>
Cc: Nathan Bossart <nathandbossart@gmail.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, "Shankaran, Akash" <akash.shankaran@intel.com>
Date: 2025-03-25T13:04:10Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Include _mm512_zextsi128_si512() in AVX-512 configure probes.
- ccd5bc93fdfe 18.0 landed
-
Properly fix AVX-512 CRC calculation bug
- 43da394304fb 18.0 landed
-
Workaround code generation bug in clang
- f83f14881c7a 18.0 landed
-
Compute CRC32C using AVX-512 instructions where available
- 3c6e8c123896 18.0 landed
-
Inline CRC computation for small fixed-length input on x86
- e2809e3a1015 18.0 landed
-
Be more paranoid in configure's checks for CRC and POPCNT intrinsics.
- fdb5dd6331e3 18.0 cited
Attachments
- v15-0001-Inline-CRC-computation-for-fixed-length-input.patch (text/x-patch) patch v15-0001
- v15-0003-Add-debug-for-CI-XXX-not-for-commit.patch (text/x-patch) patch v15-0003
- v15-0002-Improve-CRC32C-performance-on-x86_64.patch (text/x-patch) patch v15-0002
On Mon, Mar 24, 2025 at 6:37 PM John Naylor <johncnaylorls@gmail.com> wrote: > I'll take a look at the configure > checks soon, since I had some questions there. I'm leaning towards a length limit for v15-0001 so that inlined instructions are likely to be unrolled. Aside from lack of commit message, I think that one is ready for commit soon-ish. I'm feeling pretty good about 0002, but since there is still room for cosmetic fiddling, I want to let it sit for a bit longer. I felt the previous proposals for configure.ac were unnecessarily invasive, and the message looked out of place, so I made configure.ac more similar to master, using the AVX popcount stuff as a model. I also went the extra step and added a separate AC_MSG_CHECKING for vectorized CRC. I'm not sure we really need that, but this algorithm is trivially adoptable to Arm so it might be welcome for visibility. For Meson, I just made the CRC checking comment a bit more general, since keeping up this level of detail would result a loss in readability. 0003 is just to demonstrate on CI that we are in fact computing the same answer as master. An earlier patch had some additional tests in strings.sql but I have yet to dig those out. -- John Naylor Amazon Web Services