Re: pgsql: Use Intel SSE 4.2 CRC instructions where available. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Use Intel SSE 4.2 CRC instructions where available.
Date
Msg-id 3073.1429026011@sss.pgh.pa.us
Whole thread Raw
In response to pgsql: Use Intel SSE 4.2 CRC instructions where available.  (Heikki Linnakangas <heikki.linnakangas@iki.fi>)
List pgsql-committers
Heikki Linnakangas <heikki.linnakangas@iki.fi> writes:
> Whether the instructions can be used or not depends on the compiler and the
> target architecture. If generation of SSE 4.2 instructions is allowed for
> the target (-msse4.2 flag on gcc and clang), use them. If they are not
> allowed by default, but the compiler supports the -msse4.2 flag to enable
> them, compile just the CRC-32C function with -msse4.2 flag, and check at
> runtime whether the processor we're running on supports it. If it doesn't,
> fall back to the slicing-by-8 algorithm. (With the common defaults on
> current operating systems, the runtime-check variant is what you get in
> practice.)

The buildfarm says this doesn't work terribly well, at least not with icc.

            regards, tom lane


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Fix typo in comment
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Try to fix the CRC-32C autoconf magic for icc compiler.