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 1rtWHg-00FL1J-BT for pgsql-committers@arkaria.postgresql.org; Sun, 07 Apr 2024 17:26:24 +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 1rtWHe-009gqe-JR for pgsql-committers@arkaria.postgresql.org; Sun, 07 Apr 2024 17:26:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rtWHe-009goc-BZ for pgsql-committers@lists.postgresql.org; Sun, 07 Apr 2024 17:26:22 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rtWHb-001QGG-O5 for pgsql-committers@lists.postgresql.org; Sun, 07 Apr 2024 17:26:21 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 941D03200A06; Sun, 7 Apr 2024 13:26:17 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 07 Apr 2024 13:26:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1712510777; x=1712597177; bh=UB9ZrE3eB3KSGvV7Ya7hJMyz+4W9Gu6xISpO9YxR6v8=; b= lpwh7z8nR2ZbcNgZWYlmUG6igWDZPy5gvQ8qiQUS+ZHFbVeMqZF+zGDJltmUIOiy wnLeY37x3VGnESp9i3ErSdYs0aU5kACun3NYbTzxLe1HFvk0dPuLjK9yDXJMu3sC dfk3WyLRr0xKxOr/bU7GjVaw0+CQrZkBdyagkLlGTip5VnOnBjNe7T8HPSJJTj24 crBWNDsgfFQL28gpSVUbN7i6EulWJcfYLu9eFR3h1I9SG+Wo+2ntRAVYPH0Abwyd /FRq4Xr2nzPYRL6B5ns6r2wW5EzvLJs0bXTf+elSc1IJldEOk/DlSgqeWZYejM+f pSxonp8j6RDnTLCnAF2+dQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1712510777; x= 1712597177; bh=UB9ZrE3eB3KSGvV7Ya7hJMyz+4W9Gu6xISpO9YxR6v8=; b=p +GLUsn4SvGqQyWKCLeVbKBeR4OQEqxVOv1u12+cFcINTPWan6Yg/1P5qhcr9S6sP 6ZG44cgREEUZt3aG3yHW9tT5VGLbzs+jkI3AYG+WkZsUwWggvCVxgmZ/YYPKxlJn Y+yRNC0z4MPi80xcT/kUjSjy2fkoFpbEmfD08/OUZBvScdExRFmzFACRuk5SLwos HFT34kdI+6Kw2vIQ0Pk04S0rY78uirVJrqXfpI0fadWntC9QBvWrSZyDofz4Gk0n 7Q4Qyj+82u7DRp2uxOkIqcKSzbFM6xjCizjs4hLQ/fUHp16MZQU1+SN6JIgOTgBQ jWrrFAz8Mn+KEU3zTEefQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeggedgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtugfgjgesthekredttddtjeenucfhrhhomheptehn ughrvghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecugg ftrfgrthhtvghrnhephfeitefgleevtedtffejvedujeekjedugfdtveffjeelvddtfeek gefgjefhgfegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homheprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 7 Apr 2024 13:26:16 -0400 (EDT) Date: Sun, 7 Apr 2024 10:26:15 -0700 From: Andres Freund To: Melanie Plageman Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Reduce branches in heapgetpage()'s per-tuple loop Message-ID: <20240407172615.cocrsvboqm3ttqe4@awork3.anarazel.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2024-04-07 09:14:57 -0400, Melanie Plageman wrote: > On Sun, Apr 7, 2024 at 3:29 AM Andres Freund wrote: > > > > Reduce branches in heapgetpage()'s per-tuple loop > > > > Until now, heapgetpage()'s loop over all tuples performed some conditional > > checks for each tuple, even though condition did not change across the loop. > > I haven't reviewed exactly what this does, but heapgetpage() was > removed (or split into two functions, rather) in 44086b097537, so I > find the naming of this function, or, at least the comments, commit > message and description a bit confusing. Oops. That name was so ingrained in my head that despite looking over these lines quite a few times, I couldn't spot that. Will send an update to the thread. Greetings, Andres Freund