Re: Proposal for Updating CRC32C with AVX-512 Algorithm.

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: "Amonson, Paul D" <paul.d.amonson@intel.com>
Cc: Bruce Momjian <bruce@momjian.us>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Andres Freund <andres@anarazel.de>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, "Shankaran, Akash" <akash.shankaran@intel.com>
Date: 2024-08-26T18:50:00Z
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 →
  1. Compute CRC32C using AVX-512 instructions where available

On Mon, Aug 26, 2024 at 06:44:55PM +0000, Amonson, Paul D wrote:
>> I'm curious about where exactly the regression is coming from.  Is it possible
>> that your build for the SSE 4.2 tests was using it unconditionally, i.e.,
>> optimizing away the function pointer?
> 
> I am calling the SSE 4.2 implementation directly; I am not even building
> the pg_sse42_*_choose.c file with the AVX512 choice. As best I can tell
> there is one extra function call and one extra int64 conditional test
> when bytes are <256 and a of course a JMP instruction to skip the AVX512
> implementation.

And this still shows the ~14% regression in your original post?

-- 
nathan