Re: Improve the performance of Unicode Normalization Forms.
Alexander Borisov <lex.borisov@gmail.com>
From: Alexander Borisov <lex.borisov@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>, Victor Yegorov <vyegorov@gmail.com>,
Heikki Linnakangas <hlinnaka@iki.fi>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-09-29T10:22:29Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Use C11 char16_t and char32_t for Unicode code points.
- 3853a6956c3e 19 (unreleased) cited
Attachments
- v5-0001-Moving-Perl-functions-Sparse-Array-to-a-common-mo.patch (text/plain) patch v5-0001
- v5-0002-Improve-the-performance-of-Unicode-Normalization-.patch (text/plain) patch v5-0002
- v5-0003-Refactoring-Unicode-Normalization-Forms-performan.patch (text/plain) patch v5-0003
20.09.2025 04:03, Jeff Davis wrote: > On Thu, 2025-09-11 at 20:51 +0300, Alexander Borisov wrote: >> >>> Hey. >>> >>> I've looked into these patches. >> >> Hi Victor, >> >> Thank you for reviewing the patch and testing it! > > Heikki, do you have thoughts on this thread? Hey, In patch v5 (attached), I changed the approach to class caching. Now, for small texts (less than 512 characters), we don't allocate memory from the heap; we use the stack. And according to pgbench tests, we have a 2x speedup. According to Jeff's tests, we have a 10x speedup. According to tests from the thread https://www.postgresql.org/message-id/CAFBsxsHUuMFCt6-pU+oG-F1==CmEp8wR+O+bRouXWu6i8kXuqA@mail.gmail.com, we also have a 2x speedup. -- Regards, Alexander Borisov