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 BL1PR11MB5304837ABA2CC63CFE6380D0DC8F2@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>)
List pgsql-hackers
> Upthread [0], Andres suggested dispatching to a different implementation for
> compile-time-known small lengths.  Have you looked into that?  In your
> original post, you noted a 14% regression for records smaller than 256 bytes,
> which is not an uncommon case for Postgres.  IMO we should try to mitigate
> that as much as possible.

So, without adding even more conditional tests (causing more latency), I can expose a new macro called
COMP_CRC32C_SMALLthat can be called from known locations where the size is known to be 20bytes or less (or any fixed
sizeless than 256). Other than that, there is no method I know of to pre-decide calling a function based on input size.
Is there any concrete thought on this? 

Paul




pgsql-hackers by date:

Previous
From: Lakshmi Narayana Velayudam
Date:
Subject: Re: Usage of ProcessConfigfile in SIGHUP_Handler
Next
From: Tom Lane
Date:
Subject: Re: Usage of ProcessConfigfile in SIGHUP_Handler