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 1rQyzH-004atH-Ma for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Jan 2024 00:13:28 +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 1rQyzG-00BdXt-9e for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Jan 2024 00:13:26 +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 1rQyzF-00BdXl-RP for pgsql-hackers@lists.postgresql.org; Sat, 20 Jan 2024 00:13:26 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rQyzC-002iag-CI for pgsql-hackers@postgresql.org; Sat, 20 Jan 2024 00:13:24 +0000 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-6dbcdbe13e1so181119b3a.3 for ; Fri, 19 Jan 2024 16:13:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1705709600; x=1706314400; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=nKf6/yhXDDIVm0nHj0Q2h3Ox7PtvgsSs7H8DjDUSimw=; b=N3J4APg6tmVQDlc66mvUkF4psJrZx9vDhGYz0gAWaAAjvrDHEQOiQcuC59udYEBhrC JwxZB7WtSBwqBhTIIyACotBIkJYRK6WIiqwsnhp96hkuKK38N85baZmfuBFycfBvti+U GdUr8dJkeGVPwkPvWptWDWw9yznHNtCkfRqpDSRCFQz1ttfjmPlAVEWN/USCB5bjeDLp B08F3EoR0fspjd3JaaGHai0UqjMYk10gDIKG2zV/ajA6/if2uYUQwwYCP/us9eYkhQF4 nFy4Cwtn9zzD+gUaZNkE9UNs42noxu9vz/SgR0It5sAJLUX5YbCh37Uo+iHCtJdM99Bs ipzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705709600; x=1706314400; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=nKf6/yhXDDIVm0nHj0Q2h3Ox7PtvgsSs7H8DjDUSimw=; b=eClxfISWZ6jtkyCHwQpBZRSJ+XYoIe1e/lP8R0LywnhiPOQIJYBu8nhghY/QzZ4JKv dX3mfsuxeimFFff2N7zU3em2HvLNQb2eLusVGOg93SnCxMp22hqMjhZ4IZ4WHGDjj2/I 5TF0F57MnaJhEYF0l05By0FgoESz/4czFh6pHdSqLX7V3JcXZk/DpvssnZ1t83dXbHpQ d6qS0Q8X9A0xWwMLwmoGVFV1BweHOe+2EbKL+lnPWoZqYamVsjucYIQ1IB0rRupR+KvZ vw4l7HiHBQdkakOoQSILfcQnXpV4sQ2aV5bhq+Mm5D+lqgyY29J6wGsYst46faHdb+Lg 4jQg== X-Gm-Message-State: AOJu0YxD63AQcBkX9KQ7c7bDLiH8H6skL8/NWKEFK6XEGfafGFi0uhD7 pCfIm8xsatyu0BiiIDv6htB6yumhqF44MTlIY+HosswcCXsce2QodnsUVG8pEw== X-Google-Smtp-Source: AGHT+IHsd1BiekNEIGKHRQNEuG/engBsAvOn4I31qzC+Y85EiMDG/0bLTbmbehKCWarz/nswujh79g== X-Received: by 2002:a05:6a00:2d84:b0:6da:d8d5:855e with SMTP id fb4-20020a056a002d8400b006dad8d5855emr726505pfb.51.1705709600030; Fri, 19 Jan 2024 16:13:20 -0800 (PST) Received: from [172.24.2.15] ([12.126.244.130]) by smtp.gmail.com with ESMTPSA id fh4-20020a056a00390400b006d9b4a0b6e3sm5666697pfb.80.2024.01.19.16.13.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 16:13:19 -0800 (PST) Message-ID: <09924cd6c49935d5e9bba5cd40bec28c605d7c2e.camel@j-davis.com> Subject: Re: Change GUC hashtable to use simplehash? From: Jeff Davis To: John Naylor , Heikki Linnakangas Cc: Junwang Zhao , jian he , Andres Freund , Tom Lane , Gurjeet Singh , pgsql-hackers@postgresql.org Date: Fri, 19 Jan 2024 16:13:18 -0800 In-Reply-To: <611843ead9b111c763420bd09bbcb4a330032f8b.camel@j-davis.com> References: <3786e988-0dc6-4feb-866c-ab5215bf2394@iki.fi> <611843ead9b111c763420bd09bbcb4a330032f8b.camel@j-davis.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2024-01-19 at 13:38 -0800, Jeff Davis wrote: > One post-commit question on 0aba255440: why do > haszero64(pg_bswap64(chunk)) rather than just haszero64(chunk)? How > does byteswapping affect whether a zero byte exists or not? I missed that it was used later when finding the rightmost one position. The placement of the comment was slightly confusing. Is: haszero64(pg_bswap64(chunk)) =3D=3D pg_bswap64(haszero64(chunk)) ? If so, perhaps we can do the byte swapping outside of the loop, which might save a few cycles on longer strings and would be more readable. Regards, Jeff Davis