Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSnaU-0007fm-I3 for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Oct 2020 20:41:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kSnaS-0003RT-V7 for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Oct 2020 20:41:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSnaS-0003RM-O7 for pgsql-hackers@lists.postgresql.org; Wed, 14 Oct 2020 20:41:28 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSnaQ-0003EZ-O6 for pgsql-hackers@lists.postgresql.org; Wed, 14 Oct 2020 20:41:28 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 950605C01A6; Wed, 14 Oct 2020 16:41:25 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 14 Oct 2020 16:41:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=t7yA4CfN3X8VbAH9BtCoiKf+cL9 HC5LLbbnLqHPL18Y=; b=BDDziYP4efH46IKrTwK0C7/s9dYXkYLCrtdXhUJKBew IHzLa0kKja+rZRXVpxI1rwjQ8P6pVPdChztjwdhKjlc8pfjC6vbJpL8/oBGTp3DK fA+jLRpxKGul53LXi5sXvNzVQZH/YXTq1n3ZHtjGyU/XJs/p71Y3qAFv3J7DzEWC uRmjLh1AVxUjE9mKZX8yeV4gaC1RTNuaMWnR0W2WSWYS4QnJ88737fuAGhdDfOb+ q0U7AP4MvPSaCrUg+N5Tb3xGRKZyFxTv+JG3B205SglEGbrnWYj6tWo8Lji9MFPd VRVER2n0BKSbmMF6KVdRYUEognZ5k3XT2/R1AuiQi9g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=t7yA4C fN3X8VbAH9BtCoiKf+cL9HC5LLbbnLqHPL18Y=; b=C8Jc/CFP3uiwzmExH1M8Bq jhC9/Y8h33V/+ivIGAYdz1n3LicaqddcmvqIxibWVn4Dri3TJ7w3wXIJxx0hO8hQ zf8qPWnyCIMAtkhWcAokO3lU86lF6wXz0GU5fpiNAAoHCSqgmBOpAay55fXaM9uQ 9HHuoTEvaxBdGpYRCKSK20Mue++tS5Wn+KSnNqP9xKOFXcAXgF1CtsG6ZMGfJ/yt GFNQfO4ytb8ISjIkvGl1gPUTaphY6R0MUTqdZ/ZttbN348JSHdSB0g3MdGxNrX+p ttB1KEXIXFWWrHpv4wwCNDTKYPQqVC3V30a7EhiA1890IaMjiQLpvdkCx84U5osg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedriedugdduheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedukefhkeelueegveetheelffffjeegleeuudelfeefuedtleffueejfffh ueffudenucfkphepieejrdduiedtrddvudejrddvhedtnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdr uggv X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-217-250.hsd1.ca.comcast.net [67.160.217.250]) by mail.messagingengine.com (Postfix) with ESMTPA id AD44D3064680; Wed, 14 Oct 2020 16:41:24 -0400 (EDT) Date: Wed, 14 Oct 2020 13:41:23 -0700 From: Andres Freund To: Michael Paquier Cc: Postgres hackers Subject: Re: Some remaining htonl() and ntohl() calls in the code Message-ID: <20201014204123.vcewobvt3bp4jr7h@alap3.anarazel.de> References: <20201014055303.GG3349@paquier.xyz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201014055303.GG3349@paquier.xyz> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2020-10-14 14:53:03 +0900, Michael Paquier wrote: > Since 510b8cbf, we have in-core equivalents for htonl(), ntohl() & co > through pg_bswap.h that allows to compile with a built-in function if > the compiler used has one. > > All the existing calls in the code tree have been changed with > 0ba99c84 for performance reasons (except the libpq examples), however > the FE/BE code of GSSAPI encryption code did not get this call in > b0b39f7. I think that we had better switch to the built-ins functions > as well for this case. The argument of consistency matters here, but > also perhaps the argument of performance, where it may not be easy to > measure a difference. +1 Greetings, Andres Freund