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 1t8qer-006JON-CM for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Nov 2024 00:45:56 +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 1t8qeo-00ANMD-IH for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Nov 2024 00:45:55 +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 1t8qeo-00ANM5-8T for pgsql-hackers@lists.postgresql.org; Thu, 07 Nov 2024 00:45:54 +0000 Received: from fhigh-a3-smtp.messagingengine.com ([103.168.172.154]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t8qek-000auS-PQ for pgsql-hackers@lists.postgresql.org; Thu, 07 Nov 2024 00:45:54 +0000 Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfhigh.phl.internal (Postfix) with ESMTP id 0EBDD1140186; Wed, 6 Nov 2024 19:45:50 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-10.internal (MEProxy); Wed, 06 Nov 2024 19:45:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc: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=fm3; t=1730940350; x=1731026750; bh=ZEXEzsoOSK AKytaqJyqQd1Z46G9Fj1DU2y/OMs33FP4=; b=fYeUtJtjWaBHGUJkm9pPH52wc0 b6HFPgHDfPOc8lDizYpdTuoKp3st45VXPlsZME0yRNKO9Kdei0zMVBvq+T71KTLI uCvb/Mn9MQWVhINGLGY+mrr/LDfIJXpws14wmeANquCGZDTaKgDllotJRoEalo6d sE08KvDUrWCGb3y6IZbx62v+0c+trVXPb7T1mYtbenQ/MYnCQWpNsQ7s004kG+VQ XqGc0joq5IEnxB9gBbFgTl7thN3uiCbNZRPIjHNLap89tJ8wrCa+y7Ympu76fEBV etuuJ8ohuKKFndxEnWTB3rENEgM43aITGe3rRyuEqckB0OWNMbZ/mYZ31hAQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1730940350; x=1731026750; bh=ZEXEzsoOSKAKytaqJyqQd1Z46G9Fj1DU2y/ OMs33FP4=; b=mFHtSZB9NG9EV2FZDlA48mzGL58Pp5d2GX6y/YuCeMq/TYMg+jH 2652VKz6jpRB2HASYoeVpN9+tEb9SQY6ytGHv6nhSygLQQuUdJZCjOwDKaKSvwsi i6ErrXwfP1zRFd7R3VtHydKI7SbDuhryn2+MPPuHpaGYihlF6SN7anetEM4fWnr+ eVsfYTAss1gqE2gHJc0d+O36k9dWRj2aAWsHidolL7dyCp2wyHugXfX7GLMGpiNo y9c/uJsKC6Kf1wDdHOSA3Jej2dXy4LgiLN+zKOdSIEmQfmTCSfrB1/4vLG+iRWle SLLDUFbUWqnD/o1/jsZEu2M2PNTyO0lSw4Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrtdefgddvhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenfghrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhgg tggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoe hmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleei fedufffhhfdtteelgeeggeffhfekueevteeigfduudevudetgfegiedvjeenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehp rghquhhivghrrdighiiipdhnsggprhgtphhtthhopeejpdhmohguvgepshhmthhpohhuth dprhgtphhtthhopegughhrohiflhgvhihmlhesghhmrghilhdrtghomhdprhgtphhtthho pehpvghtvghrsegvihhsvghnthhrrghuthdrohhrghdprhgtphhtthhopegsvghrthhrrg hnuggurhhouhhvohhtrdhpghesghhmrghilhdrtghomhdprhgtphhtthhopehrrghnihgv rhdrvhhfsehgmhgrihhlrdgtohhmpdhrtghpthhtohepshhmihhthhhpsgdvvdehtdesgh hmrghilhdrtghomhdprhgtphhtthhopehhlhhinhhnrghkrgesihhkihdrfhhipdhrtghp thhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrd horhhg X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 6 Nov 2024 19:45:47 -0500 (EST) Date: Thu, 7 Nov 2024 09:45:44 +0900 From: Michael Paquier To: David Rowley Cc: Peter Eisentraut , Bertrand Drouvot , Ranier Vilela , Peter Smith , Heikki Linnakangas , pgsql-hackers@lists.postgresql.org Subject: Re: define pg_structiszero(addr, s, r) Message-ID: References: <0ead6139-707f-4a21-b1df-afdd7ae5d1a6@eisentraut.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QjTCsk6JQPwz9iqg" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --QjTCsk6JQPwz9iqg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 07, 2024 at 08:05:10AM +1300, David Rowley wrote: > That might be quite good for small lengths or for use cases where the > memory is always or almost always zero. The problem is there's no > early exit when you find the first non-zero which means, for larger > lengths, reading much more memory. That'll both take longer and > possibly evict cache lines which might be useful to have in the near > future. Didn't know this one either, thanks for the explanation. -- Michael --QjTCsk6JQPwz9iqg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmcsDbgACgkQnvQgOdby QH0ooA/+IjlccroGzKe4rNFKi2xA9K/vujCOra7+6DA7WVj1mJPUl7YpEi99/7nt rgAw0+zNqYMQJMZY7B3NJOZOrhCzrywX3lD6QBvua4/1xsQGPhfSfq+oe6S7Q2HY nJvZ4jsTR8KKJfGonhrkBpy5vofADTl4gU49QJQwFU5qsj7eMPDQWkc88NXbN5xl hrZZs5p4HkgB8vOUKG/AEAKkan1syNf6AL0yiHY2MQdwMfxxlrPIamKPvANQ7tzT EXWKY4gpOrJ0lQ4Z2y6EuJXGq22uxpOgX4Yh6JxGqBD0dEn7m7/g/E6vHiwKiMVm oVHKTzkL3NJkmGjjOE65T5pzoe+l8msxAx2FNlB9A7PlB7N8vUf3Yg6gLjrMeKRI xntkRKvAxGiTeADLbPhYwS1vGzQL7cjB/XWZ/W4gewq5cNbacBeleNOnbu2O2t7+ FTKWpdEZ9fK4hxbBevthiizf4+EqPcO3dFp4MHEbLrXTtLYPZ8IyLnPmvQoMcFAS 7vTJ7JHV/hjt2aZlzmfufaCpk1o8xG0hgDXXhYx0YN2l/vXwd+n8/UPLNtTgbOP0 n6FoOkLZlvBqP6naS9EtsH0Z223QPe1VYa/eLPuNWGpcZfn0eRG0KQUT7XM2JEBk MFq8f2Zv8v/m3BRDgoXPKKxTUeadaSOz70c0XdOz7QVPpIyBTV0= =cMTj -----END PGP SIGNATURE----- --QjTCsk6JQPwz9iqg--