Re: Optimization for lower(), upper(), casefold() functions.
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Alexander Borisov <lex.borisov@gmail.com>,
Heikki Linnakangas <hlinnaka@iki.fi>, pgsql-hackers@postgresql.org
Date: 2025-03-18T17:49:00Z
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
Jeff Davis <pgsql@j-davis.com> writes: > On Tue, 2025-03-18 at 11:11 -0400, Tom Lane wrote: >> Also, probably better to make it const: >> >> -static const pg_wchar *casekind_map[NCaseKind] = >> +static const pg_wchar * const casekind_map[NCaseKind] = > Was this a general suggestion, or did you see something in particular > that would make it more optimizable this way? No, just a general style position that tables that aren't supposed to change should be const. Cases like this are a tad insidious because it looks like you did make the table const, only you didn't. regards, tom lane