Re: speed up unicode decomposition and recomposition

Поиск
Список
Период
Сортировка
От John Naylor
Тема Re: speed up unicode decomposition and recomposition
Дата
Msg-id CAFBsxsFwu0w4TNK+UnCfnzsi2nGKkG3LBKXCPCjDJBXg6iZpjw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: speed up unicode decomposition and recomposition  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: speed up unicode decomposition and recomposition  (John Naylor <john.naylor@enterprisedb.com>)
Список pgsql-hackers
Attached v3 addressing review points below:

On Thu, Oct 15, 2020 at 11:32 PM Michael Paquier <michael@paquier.xyz> wrote:
+   # Then the second
+   return -1 if $a2 < $b2;
+   return 1 if $a2 > $b2;
Should say "second code point" here?

Done. Also changed the tiebreaker to the composed codepoint. Beforehand, it was the index into DecompMain[], which is only equivalent if the list is in order (it is but we don't want correctness to depend on that), and not very clear.
 
+       hashkey = pg_hton64(((uint64) start << 32) | (uint64) code);
+       h = recompinfo.hash(&hashkey);
This choice should be documented, and most likely we should have
comments on the perl and C sides to keep track of the relationship
between the two.

Done.
 
<separate headers>

Done. 

Other cosmetic changes:
- format recomp array comments like /* U+0045+032D -> U+1E18 */
- make sure to comment #endif's that are far from the #if
- small whitespace fixes

Note: for the new header I simply adapted from unicode_norm_table.h the choice of "There is deliberately not an #ifndef PG_UNICODE_NORM_TABLE_H here", although I must confess I'm not sure what the purpose of that is, in this case.

--
John Naylor
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company 
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: [DOC] Document concurrent index builds waiting on each other
Следующее
От: Tom Lane
Дата:
Сообщение: Mop-up around psql's \connect behavior