Re: speed up text_position() for utf-8

Поиск
Список
Период
Сортировка
От John Naylor
Тема Re: speed up text_position() for utf-8
Дата
Msg-id CAFBsxsGAcmsHFsiNh=TywjkwOgebbT87hsrPRkgf-b=HLO=vjA@mail.gmail.com
обсуждение исходный текст
Ответ на speed up text_position() for utf-8  (John Naylor <john.naylor@enterprisedb.com>)
Ответы Re: speed up text_position() for utf-8  (John Naylor <john.naylor@enterprisedb.com>)
Список pgsql-hackers
I wrote:

> The test is attached and the test function is part of the patch. It's
> based on the test used in the commit above. The test searches for a
> string that's at the end of a ~1 million byte string. This is on gcc
> 11 with 2-3 runs to ensure repeatability, but I didn't bother with
> statistics because the differences are pretty big:
>
>                   patch                  | no match | ascii | mulitbyte
> -----------------------------------------+----------+-------+-----------
>  PG11                                    |     1120 |  1100 |       900
>  master                                  |      381 |  2350 |      1900
>  DFA                                     |      386 |  1640 |      1640
>  branchless utf mblen                    |      387 |  4100 |      2600
>  inline pg_utf_mblen()                   |      380 |  1080 |       920
>  inline pg_utf_mblen() + ascii fast path |      382 |   470 |       918

I failed to mention that the above numbers are milliseconds, so
smaller is better.

-- 
John Naylor
EDB: http://www.enterprisedb.com



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: logical decoding and replication of sequences
Следующее
От: Chapman Flack
Дата:
Сообщение: Re: Privilege required for IF EXISTS event if the object already exists