Re: Optimization for lower(), upper(), casefold() functions.
Alexander Borisov <lex.borisov@gmail.com>
From: Alexander Borisov <lex.borisov@gmail.com>
To: Jeff Davis <pgsql@j-davis.com>, Heikki Linnakangas <hlinnaka@iki.fi>,
pgsql-hackers@postgresql.org
Date: 2025-03-14T12:00:57Z
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 →
-
Fix headerscheck warning.
- 549ea06e4217 18.0 landed
-
Optimization for lower(), upper(), casefold() functions.
- 27bdec06841d 18.0 landed
-
Refactor convert_case() to prepare for optimizations.
- d3b2e5e1ab5c 18.0 landed
-
Improve performance of Unicode {de,re}composition in the backend
- 783f0cc64dcc 14.0 cited
Attachments
- v7-0001-Optimization-for-lower-upper-casefold-functions.patch (text/plain) patch v7-0001
14.03.2025 06:43, Jeff Davis wrote: > On Wed, 2025-03-12 at 23:39 +0300, Alexander Borisov wrote: >> v5 attached. > > Attached v6j. I like the current changes. Some comments: [...] > * modified perl code so that it produces code that's already pgindented > * cleanup of perl code, removing unnecessary subroutines and variables Does it make sense to arrange table creation in this way (lower, title, upper, fold, special), don't you think it complicates code perception, it turns out to be just copy-past. Previously, the creation of these tables was done in a loop, which required little code and understandable. I tried adding a loop to create tables, and everything looks fine (v7). Also removed unnecessary (hanging) global variables. > * added a few comments > * ran pgperltidy > > Some of the perl code working with ranges still needs further cleanup > and explanation, though. It's all about not getting too carried away. In my vision these subroutines (user-defined functions) will have to be moved to perl module (.pm) in the future, after the patch is committed, so that the code can be used for Normalization Forms. So it seems that removing the branch_function() sub, or rather simplifying it and writing it in place, was unnecessary. But it is not terrible. v7 attached. Regards, Alexander Borisov