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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] backend: compare word-at-a-time in bcTruelen
Дата
Msg-id 22169.1245984538@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 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> writes:
> I've put together some data from a microbenchmark of the bcTrulen 
> function, patched and unpatched.

Uh, where's the data?

> In the worst cases, I see a 53% cost increase on x86 (with the string 
> 'aaa ') and a 97% increase on PowerPC ('a  ').
> So, it all depends on the number of padding spaces we'd expect to see on 
> workload data. Fortunately, we see the larger reductions on the more 
> expensive operations (ie, longer strings).

Unfortunately, the cases with lots of padding spaces are probably much
less probable than the cases with fewer.  It would be unpleasant for
example if this patch resulted in a severe performance degradation for
a "canonical" example of char(n) being used properly, such as char(2)
for US state abbreviations.
        regards, tom lane


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

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