Re: always use runtime checks for CRC-32C instructions - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: always use runtime checks for CRC-32C instructions
Date
Msg-id c1e9436426cb0368c6664130c3e89b8923bc449d.camel@j-davis.com
Whole thread Raw
In response to Re: always use runtime checks for CRC-32C instructions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: always use runtime checks for CRC-32C instructions
List pgsql-hackers
On Mon, 2023-10-30 at 12:39 -0400, Tom Lane wrote:
> It seems like a shame
> to be burdening these instructions with a subroutine call for the
> benefit of long-obsolete hardware versions.

It's already doing a call to pg_comp_crc32c_sse42() regardless, right?

I assume you are concerned about the call going through a function
pointer? If so, is it possible that setting a flag and then branching
would be better?

Also, if it's a concern, should we also consider making an inlineable
version of pg_comp_crc32c_sse42()?

Regards,
    Jeff Davis




pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: MERGE ... RETURNING
Next
From: David Rowley
Date:
Subject: Re: Making aggregate deserialization (and WAL receive) functions slightly faster