Re: wchareq improvement

Поиск
Список
Период
Сортировка
От a_ogawa
Тема Re: wchareq improvement
Дата
Msg-id PIEMIKOOMKNIJLLLBCBBKEIECHAA.a_ogawa@hi-ho.ne.jp
обсуждение исходный текст
Ответ на Re: wchareq improvement  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
Bruce Momjian wrote:
>
> Patch applied with adjustment --- the second part of your patch that
> skips comparing the first byte seemed unnecessary.  It seemed likely
> to cause a cpu stall, so just doing the loop seemed faster.
>
> Did you test if the second part of your patch actually caused a speedup?

Well, I measured the performance today. As a result, I confirmed the
second part of my patch is unnecessary as you pointed it out.
Thanks for comment and applying patch.

> a_ogawa wrote:
> >
> > In SQL that uses 'like' operator, wchareq is used to compare characters.
> >
> > At the head of wchareq, length of (multibyte) character is compared by
> > using pg_mblen. Therefore, pg_mblen is executed many times, and it
> > becomes a bottleneck.

regards,

--- Atsushi Ogawa


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Implementation of SQLSTATE and SQLERRM variables
Следующее
От: Neil Conway
Дата:
Сообщение: Re: O_DIRECT for WAL writes