pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tristan Partin <tristan@partin.io>
To: Nazir Bilal Yavuz <byavuz81@gmail.com>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Chao Li <li.evan.chao@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Add ASCII fast path to Unicode normalization functions
Date: Fri, 18 Sep 2026 14:52:42 +0000
Message-ID: <DLIJ02ES864W.F2STNXXIH8YM@partin.io> (raw)
In-Reply-To: <CAN55FZ2OR9G=aiUXQiiaOS2T897uX2zohczZ80u1bK0R7CNX2g@mail.gmail.com>
References: <8cb366d6-a30f-49a4-b5d3-a5dfc0f2fea2@dunslane.net>
	<A74D357E-B898-4E92-8619-1D9A0FC8B69B@gmail.com>
	<f483174f-c592-4b9f-8648-0644ba1b044a@dunslane.net>
	<CAN55FZ2OR9G=aiUXQiiaOS2T897uX2zohczZ80u1bK0R7CNX2g@mail.gmail.com>

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 <andrew@dunslane.net> 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.

-- 
Tristan Partin
PostgreSQL Contributors Team
AWS (https://aws.amazon.com)






view thread (16+ messages)  latest in thread

Message-ID: <DLIJ02ES864W.F2STNXXIH8YM@partin.io>
Permalink:  ../DLIJ02ES864W.F2STNXXIH8YM@partin.io/
Also on:    postgresql.org/message-id/DLIJ02ES864W.F2STNXXIH8YM@partin.io

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tristan@partin.io, byavuz81@gmail.com, andrew@dunslane.net, li.evan.chao@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Add ASCII fast path to Unicode normalization functions
  In-Reply-To: <DLIJ02ES864W.F2STNXXIH8YM@partin.io>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox