Re: [PATCH] backend: compare word-at-a-time in bcTruelen

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: [PATCH] backend: compare word-at-a-time in bcTruelen
Дата
Msg-id 20090626121211.GI20436@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: [PATCH] backend: compare word-at-a-time in bcTruelen  (Jeremy Kerr <jk@ozlabs.org>)
Ответы Re: [PATCH] backend: compare word-at-a-time in bcTruelen  (Jeremy Kerr <jk@ozlabs.org>)
Список pgsql-hackers
* Jeremy Kerr (jk@ozlabs.org) wrote:
> > Is it just the size that matters, or is it when there are few spaces
> > at the end?
>
> It's the number of spaces at the end. If we knew this number, then we
> wouldn't have to do any comparisons at all :)

I meant in terms of affecting the performance of this function..  We
know the total length of the string, including spaces, coming into the
function.  If the updated function is always faster when the overall
string is at least, say, 16 characters long, then Dimitri's suggestion
to just check the overall length coming in and decide which approach to
use might make sense.  If the new function is always slower, regardless
of overall string length, when there's only 1 extra space at the end,
then chances are it's not worth it.
Thanks,
    Stephen

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

Предыдущее
От: Jeremy Kerr
Дата:
Сообщение: Re: [PATCH] backend: compare word-at-a-time in bcTruelen
Следующее
От: Jeremy Kerr
Дата:
Сообщение: Re: [PATCH] backend: compare word-at-a-time in bcTruelen