Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uCnN5-002NFT-KY for pgsql-hackers@arkaria.postgresql.org; Wed, 07 May 2025 22:36:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uCnN4-00Gxnh-Dy for pgsql-hackers@arkaria.postgresql.org; Wed, 07 May 2025 22:36:10 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uCnN4-00GxnZ-4H for pgsql-hackers@lists.postgresql.org; Wed, 07 May 2025 22:36:10 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uCnN1-000fHn-1y for pgsql-hackers@lists.postgresql.org; Wed, 07 May 2025 22:36:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 547MZikP084825; Wed, 7 May 2025 18:35:44 -0400 From: Tom Lane To: John Naylor cc: Eduard Stefes , "pgsql-hackers@lists.postgresql.org" , "iii@linux.ibm.com" , "rueckner@linux.ibm.com" Subject: Re: Review/Pull Request: Adding new CRC32C implementation for IBM S390X In-reply-to: References: <918d9941377f6e83fbfebe96ba496ccaefa3803f.camel@ibm.com> Comments: In-reply-to John Naylor message dated "Thu, 08 May 2025 05:23:52 +0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <84823.1746657344.1@sss.pgh.pa.us> Date: Wed, 07 May 2025 18:35:44 -0400 Message-ID: <84824.1746657344@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk John Naylor writes: > We prefer that 'a' and 'b' are declared as global variables, just to > make it as realistic as possible, although it doesn't seem to make > much difference when I tried it on Compiler Explorer. (Same for > autoconf) Yeah, see commit fdb5dd6331e305f797bb589747f056062c305f0b for some recent precedent, and for explanation of why we think it's worth worrying about. It's not so much that "global" matters, it's that we don't want the compiler to have the option to fold the whole test to a constant, which it would be within its rights to do as you have this. regards, tom lane