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 1tXkEn-00DY6T-6s for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Jan 2025 16:57:57 +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 1tXkEl-002Cxu-OW for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Jan 2025 16:57:56 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tXkEl-002Cxm-FF for pgsql-hackers@lists.postgresql.org; Tue, 14 Jan 2025 16:57:55 +0000 Received: from mail-io1-xd33.google.com ([2607:f8b0:4864:20::d33]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tXkEk-000O1o-2k for pgsql-hackers@postgresql.org; Tue, 14 Jan 2025 16:57:55 +0000 Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-84cdacbc373so185123039f.1 for ; Tue, 14 Jan 2025 08:57:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736873873; x=1737478673; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ezUFWawtBFsmWQJhj+AdNCyvBCEjIYSkRhJb6BB4O8Y=; b=NM+7jDDXpja0rPMjKib4PBGqz39Azk7ijlK8k0TKqIjIX53KvC5bH427agwDbW3AcJ KH4nuJX8QC3l4QTQYNwh3U1c3Hl4E8jGe+Y9EXM915RrPxtemKP7RfckvOthYkxzs175 /IhWnksYnHPrPniStUkwn2lIkTDNgb4KqqS8DZodof/HMm91xyBpIrYV7rf2rhgrFEq4 P5ABi4X52ASqF7NHsPB1wWK1nQwJVK891ifFQIV/g9f8jPh7J/jK+RNv4QUHkdIs6gvT SkyrT0bJpGT+yMyCiGUSqfrm/MzPKs2uL9Eufzwf8sMw9sUKAvRWUDKZB49kcpBFoqJi rUuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736873873; x=1737478673; 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 :message-id:reply-to; bh=ezUFWawtBFsmWQJhj+AdNCyvBCEjIYSkRhJb6BB4O8Y=; b=XakAuZa+u1rAERPj7EvogQJChQvPEQw6CkuinkSpMCPGBxNxtO86NO10IT/aHvRx4e /uJvfLe/3LjaDwq096ji5cbytV4hy7uRiSWqGQkOHhcIKCBtP/kVugAKViv4GCDtSXye noHsKJIvrCjjNgwUJIAwwi5A/JePGKNxDMuVOjvL8O5O87aO9Uw9cL0n/r8iq2uAGPQx 8NJDYs5egffAloBowimPtUaOigYdVTMMYrwflcfR2CUFLtBxP2L8OEHm4YGM5QPBjQCz 2Rkyq93PDo2qyU+RGETJwy1+oLZH7A9VWoUbYEhFkYN+8Jnb65AQ/9CLa+Li/Rw9IKTB XsDQ== X-Forwarded-Encrypted: i=1; AJvYcCWmZwTifN4ERFy0ulRauoI55BLHbBOERd+FVrF534qn7IL+EErqMN49vkwLrjZIEMS1/EX40/lhIgSOkz0e@postgresql.org X-Gm-Message-State: AOJu0YyarNjrcgtPCes/oOIWjwGv3CHIqhKdEBhS63Kd65cUf6zRG/bd aUpXMnkzIGXqtVZQe3PoPlAi/Yrgzlyuhy4EFugpWvVVBztff9R8 X-Gm-Gg: ASbGncuuolRkLCm9WkwY68WbIygt796IR4eBsDyQEKP1YZqF1cXa82ZGVHhwWMQI0aB AeqndGIsdoMx/8cJ7RS0dEuxLn2eQuDQJ1+tSBmRYazziU5wixN71cM2R+71TAVhE4whM8HPu0R YMFTzzrgAOvNSB3xMmbCioieOUu16l/vauM5sOxopLCUJF0vGqmGr8AUnwwPn5k4pxpsFriHWZM ZGquUGkhFZb+sxMTpjglayio95gpzmYYwcufczPSBSQFODPVFgJskNudsiDsP3/Um+jMbRNktQI /TCAB49AS2ODSrSGqdrWz8uAFfs6IwwnRi7Rd0fICbnffKI= X-Google-Smtp-Source: AGHT+IFpBnPuEH+KJi0TfB6Ro5/dqldB0bRtTDjwJeqdGmlkDGgqvud9O719rvZtnYK19tMIjR5vIQ== X-Received: by 2002:a05:6e02:198e:b0:3a7:8d8e:e730 with SMTP id e9e14a558f8ab-3ce3a8ec729mr184371725ab.22.1736873873559; Tue, 14 Jan 2025 08:57:53 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4ea1b5fa302sm3586467173.17.2025.01.14.08.57.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2025 08:57:53 -0800 (PST) Date: Tue, 14 Jan 2025 10:57:51 -0600 From: Nathan Bossart To: Tom Lane Cc: John Naylor , "Chiranmoy.Bhattacharya@fujitsu.com" , "Devanga.Susmitha@fujitsu.com" , "pgsql-hackers@postgresql.org" , "Ragesh.Hajela@fujitsu.com" Subject: Re: [PATCH] Hex-coding optimizations using SVE on ARM. Message-ID: References: <622082.1736834344@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <622082.1736834344@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Jan 14, 2025 at 12:59:04AM -0500, Tom Lane wrote: > John Naylor writes: >> We can do about as well simply by changing the nibble lookup to a byte >> lookup, which works on every compiler and architecture: Nice. I tried enabling auto-vectorization and loop unrolling on top of this patch, and the numbers looked the same. I think we'd need CPU intrinsics or an even bigger lookup table to do any better. > I didn't attempt to verify your patch, but I do prefer addressing > this issue in a machine-independent fashion. I also like the brevity > of the patch (though it could do with some comments perhaps, not that > the existing code has any). +1 -- nathan