Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yi2wx-0004dv-LF for pgsql-committers@arkaria.postgresql.org; Tue, 14 Apr 2015 15:40:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yi2wx-0000lB-0J for pgsql-committers@arkaria.postgresql.org; Tue, 14 Apr 2015 15:40:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yi2ww-0000l4-5i for pgsql-committers@postgresql.org; Tue, 14 Apr 2015 15:40:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yi2wo-0001eF-P1 for pgsql-committers@postgresql.org; Tue, 14 Apr 2015 15:40:29 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id t3EFeCDk030757; Tue, 14 Apr 2015 11:40:12 -0400 From: Tom Lane To: Heikki Linnakangas cc: pgsql-committers@postgresql.org Subject: Re: pgsql: Use Intel SSE 4.2 CRC instructions where available. In-reply-to: References: Comments: In-reply-to Heikki Linnakangas message dated "Tue, 14 Apr 2015 14:09:28 -0000" Date: Tue, 14 Apr 2015 11:40:11 -0400 Message-ID: <3073.1429026011@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org Heikki Linnakangas 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 -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers