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.98.2) (envelope-from ) id 1x7ZxL-00000000Ubt-1VC0 for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Sep 2026 14:52:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x7ZxK-00000001jEN-1T6w for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Sep 2026 14:52:50 +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.98.2) (envelope-from ) id 1x7ZxJ-00000001jEE-3RcN for pgsql-hackers@lists.postgresql.org; Fri, 18 Sep 2026 14:52:50 +0000 Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7ZxG-000000002zV-3QOy for pgsql-hackers@lists.postgresql.org; Fri, 18 Sep 2026 14:52:49 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id F33567A012B; Fri, 18 Sep 2026 10:52:43 -0400 (EDT) Received: from phl-imap-15 ([10.202.2.104]) by phl-compute-05.internal (MEProxy); Fri, 18 Sep 2026 10:52:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=partin.io; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1789743163; x=1789829563; bh=aJ+vWSaLsgWZSte0/i0LvwGH2kmd0wYy+euQIJ07Z8E=; b= fQpJK0+jqW6V/35xCI6NeSnuJGeTX6+EY2hpgfyfvdXTJohGDUka39HPa0RLe9EH cG2AKfg2EC0qKn6DS8VedY0+ATJHuJ18kfzHetxxaAVLl+GArI6l45Y6DbQs+mVV IOr7EeFro5BB7i/77FnKQ+yjilorXVsiHXyLAREo67ZOFfOFcJ8X8oRIln2GL1DG 4hO5YVeo/D7x4Yfbjl7kelZH19exkqoFePjexa0ErUBHGgpP6fOpnURXR+pyc+a3 VvywUGcg6umYWxLcxzG6HxXUBUAu+examoNwgbalCzdOfKh4dIbCvHifPKB8T4sm AA7Eh1PYu2X0268s6Hhsaw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1789743163; x= 1789829563; bh=aJ+vWSaLsgWZSte0/i0LvwGH2kmd0wYy+euQIJ07Z8E=; b=q ZaNpqzXuwaycZ0Ampv7sxzDzK7Xe5m8ab7GzrWmj1S3x4zxxOTXQO+t0S6aS9nj7 q4xkspAOPmJLWKarOE3lm6GcJclHdI8gKSVLFAATSM4IQn7izLu+0iHdmPKFDUD7 KJ2dNNoC66Igs1TJ/DiMpryojeCO38mqArIIq9hBAJIpapfcNcR5wcicH4dgOuI3 e9pTXhA1RN5CdvpzbdpR8RT4cMq1E8se3UN+Q0I5SNnvx4p2tbBRy+q05O3IfZpw ngmY9tkwx52WtDWERBR7OPZqIgKjGnj914oqvJk+kD5msHJY4yEbZnYR7/K+pe9d BJDscrOjX6Y58Ga19fBag== X-ME-Sender: X-ME-Proxy-Cause: dmFkZTFn6CS/n+t9dHGUgb9a0E2DmZKvTtRzFCiCznuvgZ2JKXv4woH50AfCTnHUg/7F8r tVeLR1vL4nu3uZ7apCg9waTKWr5cJ3m8SuzkMKF9few9t9SGf7cTWpBiauGhvswxQEGTfz N98uXJho0vL5ed6yCt2g2c/cRiWpgQh2T8P9mbCFZsgcKENw+u5evmagW4Fi5xQqrV6qFn 4HEeqpoJftcColr6Y6eefKnEJ655/je4HL+mbbTXPCataj0BfvUe1tuH9oFdL80cHPES9X 1svio0o6Q8ZFtKAfNeYYGDkIIs9EyJS436Mkh3oG7yu06iMRXh2EnlvCj69VTS6AMlvGgW V56eiHj3QNY5eo+CIP6CjkEz4nc34T0ivViSbZCycCZbqmP9FszotphhU7/hcNjD13o/9a +RyT8BGJfAGuc+uEa9+PtqZdTOTj4Z0tfCLsMK/hAdnyZhR0T4luRsZ3isPRBr/f3/x5SB /oIid5lkj5wWyQaFHUd8/E8PhY5tFCxEViqPH9RI/KitWJA2cz0IESeB3vQdol/XP08MFS XSGQ4B0lYmXGAm7C9KXzYluO4jagS5C6i9cahaNyp8Ygp50tf8stpktVih/5J4pfZLLyAr tKS7N+7M9RRIQCczMypMqfmsBOol2UjaRhk1h22k7FOoGS/sVpiQOSIiRNgg X-ME-Proxy: Feedback-ID: idd01497b:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 1FD67780070; Fri, 18 Sep 2026 10:52:43 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 18 Sep 2026 14:52:42 +0000 Message-Id: Cc: "Chao Li" , "PostgreSQL Hackers" Subject: Re: Add ASCII fast path to Unicode normalization functions To: "Nazir Bilal Yavuz" , "Andrew Dunstan" From: "Tristan Partin" X-Mailer: aerc 0.22.0-23-g35fceeedf4d2-dirty References: <8cb366d6-a30f-49a4-b5d3-a5dfc0f2fea2@dunslane.net> In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue Sep 15, 2026 at 8:01 AM CDT, Nazir Bilal Yavuz wrote: > Hi, > > Thank you for working on this! > > On Tue, 15 Sept 2026 at 14:31, Andrew Dunstan wrote= : >> >> On 2026-09-15 Tu 12:22 AM, Chao Li wrote: >> > >> > The attached is my test script. >> > >> >> Great, thanks for the review and tests. > > What do you think about continuing from where text_ascii_check() is > left? I wrote a patch for this and benchmarked with Chao's script. > > Timings are v1 vs v2, not master vs v2. > > # unicode_is_normalized() > > * all ascii: 89.115ms | 87.803ms > * mixed: 249.239ms | 126.011ms -> improvement > * non-ascii: 1243.496ms | 1244.052ms > * late-non-ascii: 3632.410ms | 370.966ms -> improvement > > # unicode_normalize_func() > > * all ascii: 84.458ms | 84.636ms > * mixed: 578.684ms | 226.093ms -> improvement > * non-ascii: 3651.573ms | 3644.026ms > * late-non-ascii: 10513.861ms | 942.470ms -> improvement > > # unicode_assigned() > > * all ascii: 61.147ms | 60.658ms > * mixed: 124.193ms | 86.186ms -> improvement > * non-ascii: 507.130ms | 510.247ms > * late-non-ascii: 1169.617ms | 166.924ms -> improvement > > Do you think these results worth the additional complexity? This is a nice change. Great idea. --=20 Tristan Partin PostgreSQL Contributors Team AWS (https://aws.amazon.com)