Re: pgsql: Use Intel SSE 4.2 CRC instructions where available.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Use Intel SSE 4.2 CRC instructions where available.
Date: 2015-04-14 15:40:11
Message-ID: 3073.1429026011@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2015-04-14 16:01:56 Re: [COMMITTERS] pgsql: Use Intel SSE 4.2 CRC instructions where available.
Previous Message Heikki Linnakangas 2015-04-14 15:34:31 Re: [COMMITTERS] pgsql: Use Intel SSE 4.2 CRC instructions where available.

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2015-04-14 16:01:56 Re: [COMMITTERS] pgsql: Use Intel SSE 4.2 CRC instructions where available.
Previous Message Heikki Linnakangas 2015-04-14 15:34:31 Re: [COMMITTERS] pgsql: Use Intel SSE 4.2 CRC instructions where available.