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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] backend: compare word-at-a-time in bcTruelen
Дата
Msg-id 7337.1246030791@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] backend: compare word-at-a-time in bcTruelen  (tomas@tuxteam.de)
Ответы Re: [PATCH] backend: compare word-at-a-time in bcTruelen  ("Andrew Dunstan" <andrew@dunslane.net>)
Список pgsql-hackers
tomas@tuxteam.de writes:
> On Fri, Jun 26, 2009 at 05:03:11PM +0200, Dimitri Fontaine wrote:
>> It's becoming somewhat tricky, but maybe the test to do for the 
>> optimisation to get used is n >= threshold && str[n-6] == 0x20, àla 
>> Boyer/Moore?

> That's cute. What about comparing the last aligned word which completely
> fits in the buffer? Something along the lines of (assuming four-byte
> words)
>    * (int*) (4 * ((int) &buf[0]) / 4)

We're trying to avoid adding cycles to the optimization-is-useless case.
The more expensive this test gets, the slower the unoptimizable case
becomes.
        regards, tom lane


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

Предыдущее
От: tomas@tuxteam.de
Дата:
Сообщение: Re: [PATCH] backend: compare word-at-a-time in bcTruelen
Следующее
От: "Andrew Dunstan"
Дата:
Сообщение: Re: [PATCH] backend: compare word-at-a-time in bcTruelen