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 1oHfB5-0005nL-3E for pgsql-hackers@arkaria.postgresql.org; Sat, 30 Jul 2022 05:38: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 1oHfB3-0006lY-Vf for pgsql-hackers@arkaria.postgresql.org; Sat, 30 Jul 2022 05:38: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 1oHfB3-0006YA-GA for pgsql-hackers@lists.postgresql.org; Sat, 30 Jul 2022 05:38:17 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oHfB0-0006WH-TN for pgsql-hackers@postgresql.org; Sat, 30 Jul 2022 05:38:16 +0000 Received: by mail-pj1-x1036.google.com with SMTP id e8-20020a17090a280800b001f2fef7886eso7032184pjd.3 for ; Fri, 29 Jul 2022 22:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=R18KGCOHJw+AXChTPrKPXwyfQ2eXczcHDkGrezNjlF4=; b=Aze0ENlFU+rrwaMEhqRrCqdYBH21AwBDiCHdTjDGG7zE1fe9E8pZTO1Mod+8gUce/3 vTHEWNXVo8mTSFcoSt8foatXe+93LKRf6cwRiv/K46g47JY95frNoNUTEV1mY2Vm6wdJ FMp0vUZ72FJWq05q4lAyMgtxCREPbw3nPs9pvNM4qh9AGErsRvuY2cauhnJsZYgb0JLu 2bmLmb+OnQsn/OvM9Y6Ld9fXkqBVnDX2+c0eBfdHYpwtyHN0q7HsXk6ETqMaCggfBA95 n1YNuSQ6JtFvTczPEmce76oNTNC90QjLh8+D5XTMKEePBvwRfSQb7AwJah8QxtsqnLM8 c8pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=R18KGCOHJw+AXChTPrKPXwyfQ2eXczcHDkGrezNjlF4=; b=DB8xpd7tAb1mNykJp7/xqTNNdHRnpb1PDCrZGjjuFMDYzSYD3fdZfSBcyrxarrAyd3 cMtyunzJmUifuMtT8rkjWIPN9dCnIkUUzNlEQD+Jdd4VQLUkPUxfyZGCGp5SwQMH/lPt B8rBF1EM2whv9ZrtMK5V1fIHw/SBiryTCJ+SFLcp+ymqo6BPykT7DWDj8Opvkb2R2l6r oAlOQGhTnpfOG71IlF7yLQTyYyutA93l/QbFYLqO8v5QSJmcPAcP8oJe5rg4minCRGpi gJA0JoA4v+AAwQHOrokKCCIu+YTYk2eJpb+gCCz1VK88OCyu09lqEZRfA//0fyVWPf0n y1rg== X-Gm-Message-State: ACgBeo2P3NT5tNbLotIPVuSakNsqRap8fPbN5KVAXHE0GZjeQ6Wr/nK2 8RmYILihMHhrouefXK5iVnQ= X-Google-Smtp-Source: AA6agR4f2Np3SWoy814poKw1i3csDFjMmJt3qokGG4pSLR2nJabHUEdLZKWVgIcTBi/1QKJpjv+izA== X-Received: by 2002:a17:902:ce04:b0:16c:e142:5dd7 with SMTP id k4-20020a170902ce0400b0016ce1425dd7mr7144580plg.173.1659159493611; Fri, 29 Jul 2022 22:38:13 -0700 (PDT) Received: from nathanxps13 ([50.54.155.70]) by smtp.gmail.com with ESMTPSA id d11-20020a170903230b00b0016d4b17e7a7sm4797638plh.24.2022.07.29.22.38.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 22:38:13 -0700 (PDT) Date: Fri, 29 Jul 2022 22:38:11 -0700 From: Nathan Bossart To: John Naylor Cc: Andres Freund , John Naylor , pgsql-hackers Subject: Re: optimize lookups in snapshot [sub]xip arrays Message-ID: <20220730053811.GA417958@nathanxps13> References: <20220713170950.GA3116318@nathanxps13> <20220715200857.nm2gc4weixwlwbnx@awork3.anarazel.de> <20220717035957.GA3631071@nathanxps13> <20220725190419.GA4095199@nathanxps13> <20220726181906.7l4ulzjdblnanclm@alap3.anarazel.de> <20220728213423.GA408719@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 Sat, Jul 30, 2022 at 12:02:02PM +0700, John Naylor wrote: > On Fri, Jul 29, 2022 at 4:34 AM Nathan Bossart > wrote: >> * I borrowed USE_SSE2 from one of John Naylor's patches [0]. I'm not > sure >> whether this is committable, > > I'll be the first to say it's not committable and needs some thought. Since > there are several recently proposed patches that take advantage of SSE2, it > seems time for me to open a new thread and get that prerequisite settled. > I'll do that next week. Awesome. I will help test and review. >> so I would welcome thoughts on the proper >> form. Given the comment says that SSE2 is supported by all x86-64 >> hardware, I'm not seeing why we need the SSE 4.2 checks. Is it not >> enough to check for __x86_64__ and _M_AMD64? > > That's enough for emitting instructions that the target CPU can run, but > says nothing (I think) about the host compiler's ability to understand the > intrinsics and associated headers. The architecture is old enough that > maybe zero compilers in the buildfarm that target AMD64 fail to understand > SSE2 intrinsics, but I hadn't looked into it. The SSE 4.2 intrinsics check > is not necessary, but it was sufficient and already present, so I borrowed > it for the PoC. Got it, makes sense. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com