RE: Proposal for Updating CRC32C with AVX-512 Algorithm. - Mailing list pgsql-hackers

From Amonson, Paul D
Subject RE: Proposal for Updating CRC32C with AVX-512 Algorithm.
Date
Msg-id BL1PR11MB53042196148C54E95531C20ADC8B2@BL1PR11MB5304.namprd11.prod.outlook.com
Whole thread Raw
In response to Re: Proposal for Updating CRC32C with AVX-512 Algorithm.  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: Proposal for Updating CRC32C with AVX-512 Algorithm.
List pgsql-hackers
> IMHO that would be useful to establish the current state of the patch set from
> a performance standpoint, especially since you've added code intended to
> mitigate the regression.

Ok.

> +#define COMP_CRC32C_SMALL(crc, data, len) \
> +    ((crc) = pg_comp_crc32c_sse42((crc), (data), (len)))
>
> My interpretation of Andres's upthread suggestion is that we'd add the length
> check within the macro instead of introducing a separate one.  We'd expect
> the compiler to optimize out comparisons for small lengths known at compile
> time and always call the existing implementation (which may still involve a
> function pointer in most cases).

How does the m4/compiler know the difference between a const "len" and a dynamic "len"? I already when the code and
changedconstant sizes (structure sizes) to the new macro. Can you give an example of how this could work? 

Paul




pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: Proposal for Updating CRC32C with AVX-512 Algorithm.
Next
From: John H
Date:
Subject: Re: Allow logical failover slots to wait on synchronous replication