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.96) (envelope-from ) id 1wCIr3-001qpX-36 for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Apr 2026 15:05:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wCIr0-007Tao-34 for pgsql-hackers@arkaria.postgresql.org; Mon, 13 Apr 2026 15:05:35 +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.96) (envelope-from ) id 1wCIr0-007Tag-2C for pgsql-hackers@lists.postgresql.org; Mon, 13 Apr 2026 15:05:35 +0000 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wCIqz-00000000r70-1ik0 for pgsql-hackers@postgresql.org; Mon, 13 Apr 2026 15:05:35 +0000 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4888375f735so44105855e9.3 for ; Mon, 13 Apr 2026 08:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776092733; x=1776697533; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=IhymfvwGSp0JWJlkSQCuSPj1MkrOWvmeGzRjnBELBWo=; b=p9wxfgr9Pr5u1lsUmUD0cVPDirUbQNhhJY2o+HtFKwgNDRyrfxinGUvmUdduxXs6C5 h4ADoC4rQ3Rb8DoZM2s9aSfRPIBUhhkqeEeuoPEKIcBf0rxwAEW/MpmWDB93AvRs0nJG jBmaY1W4iBt1hzzQUgllHnebXtWInaqJLIOitBeYLbCWg8dS5TYRv+fWFcujt+Ra6ga2 sGf4GdEyMe8PaZUCvnshPiUn7nx8tdN7t0m2EQPWzvosspUlU20o2WK4//xqZQyoxRD3 A05H9XXxirRBMNconXkrDgKEpr17a1cmqT0O9FJIkLZqezxCXwWT3Ov28mfjzGHmrhiC haEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776092733; x=1776697533; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IhymfvwGSp0JWJlkSQCuSPj1MkrOWvmeGzRjnBELBWo=; b=EadcpQCfMYjxsbe1r7doRcJ+WiqJWnUm84wQdE8jzunVk1yvMKe7E6blM79qzPKuBe 3cPPZceix44bI4yUJAiH9iIqL7qDkKpIe3l2jVcHm8Mmfsei819mSjZUVjnlqYgnnI2O Ugfkij7FD+ZGDGPqTo5Yzq4eMlEVKJh43Zxl3exuDBB7OL5A7Tdl3kioP6RsVg8LFXAK Ars/eHqvAYeBuJRb6FUOY5Qwhq3+Kz2lvXqFmnhvot0gBi8BaPfqtfAoh4xEQZMeeiJg HGoPFJnGdb5zk1WUK1cHagqXz92NHVmzuBepyp5noqdA04x199baIOZ1yUO1NWRve8Nw aXQA== X-Forwarded-Encrypted: i=1; AFNElJ/ri7ieAvxicQPdkP+YrnI4/U9AV2wrwawjg/5gaq2wTPD+DLnuthkPNGafZZUfrpEYIpc4+8SzrF0p09db@postgresql.org X-Gm-Message-State: AOJu0Yx3G8CAE6u3mdyO8XT6kapGBuoFqSJ1hOBpa4ETBgbiWACvg/af hUQQwe2KmemtvtqyTYp/zO1Tq3+CKM6kHZ7FbAuAaJSNNFJ0HHeqKUAo X-Gm-Gg: AeBDiesqoX1S31y9FDp5cvHR0HorOOxo4QBYITt5BVVLJ6Iqxw8kD1YDIad6BpHIUHA v82tIcFZVbnWD/gXeCrhvpt/tz7TT1Fo1XhbMmjKy0qAMSnxJ24NVrDTXDFSxA06w2gT2D8oaNS BabGZ5ZWzUYngX5Dd/UXglKTXbbR3Pyfuejx4e0DrckkHLIgXY5X2f5zMRt/ozAWleBPa3J43pL MFuV/spmo2Bb1xNHl4o3blZQi6H4+jc5kohgRp2MCUgpK3Mi9/SEmNFQRnuKEFz1lSc64Psf2Ag PKp62Qn+bfawzIuO52zBroElMm0sYT9WveK5oQ4PRqxFiLoT1i22+DOVs7JjmV/Ael7zVLTzKYU 9VRmGSFruwjFZuAt2sRTPDOoo6rHO3no4hGLNdDOEcaX8VG1ISESdgKYpJ1LdOe6Nd6k6me/ZPP JSahh53Ow7+rAQEvyzBZfV X-Received: by 2002:a05:600c:8284:b0:488:d228:a133 with SMTP id 5b1f17b1804b1-488d683d280mr175384435e9.14.1776092732620; Mon, 13 Apr 2026 08:05:32 -0700 (PDT) Received: from [172.31.5.233] ([147.161.235.32]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d76eeb2d1sm13879330f8f.22.2026.04.13.08.05.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Apr 2026 08:05:32 -0700 (PDT) Message-ID: <07c79a83-94aa-4d54-95b9-cba2a29565c1@gmail.com> Date: Mon, 13 Apr 2026 17:05:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Reduce build times of pg_trgm GIN indexes To: John Naylor , Heikki Linnakangas Cc: Matthias van de Meent , pgsql-hackers References: <5d366878-2007-4d31-861e-19294b7a583b@gmail.com> <9ac3931a-180e-4283-a7a8-05eb66099206@iki.fi> <2e11134f-02c3-43da-8c39-fb520a1a251d@iki.fi> <66620ec7-0f81-4813-9cf1-b901a56efcc3@gmail.com> <2a76b5ef-4b12-4023-93a1-eed6e64968f3@gmail.com> <6439c655-e281-409d-b884-6586750d5820@iki.fi> Content-Language: en-US From: David Geier In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 08.04.2026 04:15, John Naylor wrote: > On Tue, Apr 7, 2026 at 6:27 PM Heikki Linnakangas wrote: >> But the comments on the pg_cmp functions say: >> >>> * NB: If the comparator function is inlined, some compilers may produce >>> * worse code with these helper functions than with code with the >>> * following form: >>> * >>> * if (a < b) >>> * return -1; >>> * if (a > b) >>> * return 1; >>> * return 0; >>> * >> >> So, uh, is that really a universal improvement? Is that comment about >> producing worse code outdated? Well spotted. Thanks! > > No, it's quite recent: > > https://www.postgresql.org/message-id/20240212230423.GA3519%40nathanxps13 In my original benchmarks it was faster. I'll rebase the remaining commits and do some more analysis. -- David Geier