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 1oUExX-000670-Jn for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Sep 2022 22:16:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oUExV-0002Ik-TE for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Sep 2022 22:16:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oUExV-0002HC-Hf for pgsql-hackers@lists.postgresql.org; Fri, 02 Sep 2022 22:16:17 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oUExS-0007CX-Jg for pgsql-hackers@postgresql.org; Fri, 02 Sep 2022 22:16:16 +0000 Received: by mail-pl1-x635.google.com with SMTP id v5so3141629plo.9 for ; Fri, 02 Sep 2022 15:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=DQwUQTADOsf8FUeqb/AZmVykSrWAp4966E9iu7nf4t8=; b=jcICnlee1ZYWFX2LPxM1VFGPpRZ8PgmbPNyBX+ZT4Ar5JKTx3D4jE5QxXRX9r9NrtJ mN5oqBEuH1CPSX85eFo2Jr0O91/sPYQYmzxM4ogcfSuVIGOMNTg5pD09mMQSv+wFDjte DGogIaFkbuP8Vnn7ZnJO0UEmXlom/seJq+rJeXdL6+Go9jRaT7DSFHldN2XGB6TaRd4o +mA4ZZzta2QqjTENpBQ/iW2UGB6kW/omvdj+MpkFgMGVv+90Uvm1uwn9TTlxi5pZsJ2E +yXNQb2A7Pvxb9XktB/3HXkYYrVh/hE40KBDuWtjKtT+WugbLMWnsa+oA1ZQ2r5qm2nA rqNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=DQwUQTADOsf8FUeqb/AZmVykSrWAp4966E9iu7nf4t8=; b=sHj4IzmtbeJ/hWWEgLpVb48qZHITI+5klq4Qq5VwoMho77xcLJFtDWmZXGZ7LkgNHd 6KHQGsVJqnO/fqnoK6z3u6DE/ZKELdM8djyBZEddLi5V4h+je9tTbXW8Pt0Pw2Yv+eMM 3TPlpqlFvW09c0gx6aDdkhhnn/Z5Hgw7xkXbrt622lkxipEvWN6Ia1UNntVZtL3ohE4c pkl8qvi19vdki19C/upo1EvE6+tr6k//u6IRk2u4FCF5mfP/EsedjiU80EV7YuInLjKy wAt2odULD0nDFfzrT2niFv/GJMohWeOy81DyTkN7NUuglhcx3FubdlM+RV0ubyJwoSmz kHNQ== X-Gm-Message-State: ACgBeo2zSXBAoDVVaSQqNtvMH4BJgjW1taHcm2EjQhyLvDqpnepRiWic wV6UCYerygCqdJGCxeaeF5I= X-Google-Smtp-Source: AA6agR56FHpu5SMIai8g9EtSXD9Enl3MYF0KPurK5YRvBSiHjqadxLr87zr0BRf7r2KUtMYohxocZg== X-Received: by 2002:a17:90b:1b10:b0:1fe:55ab:56aa with SMTP id nu16-20020a17090b1b1000b001fe55ab56aamr6892491pjb.11.1662156973508; Fri, 02 Sep 2022 15:16:13 -0700 (PDT) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id 12-20020a170902c10c00b0016c5306917fsm2165382pli.53.2022.09.02.15.16.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Sep 2022 15:16:12 -0700 (PDT) Date: Fri, 2 Sep 2022 15:16:11 -0700 From: Nathan Bossart To: Richard Guo Cc: PostgreSQL-development Subject: Re: make additional use of optimized linear search routines Message-ID: <20220902221611.GC1261322@nathanxps13> References: <20220901185153.GA783106@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Sep 02, 2022 at 08:15:46PM +0800, Richard Guo wrote: > +1 for the proposal. I did some simple grep work in the source codes but > not too much outputs besides the two places addressed in your patches. Thanks for taking a look! > Here are some places I noticed that might be optimized with pg_lfind*(). > But 1) these places have issues that arguments differ in signedness, and > 2) I'm not sure whether they are performance-sensitive or not. Yeah, I doubt that these typically deal with many elements or are performance-sensitive enough to bother with. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com