Re: sortsupport for text

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: sortsupport for text
Дата
Msg-id CAEYLb_UodiDUrO8bwnBJ0JqqUDdQyHjX6ZkzhgPqdiCTq9myWg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: sortsupport for text  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: sortsupport for text  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 23 July 2012 16:09, Robert Haas <robertmhaas@gmail.com> wrote:
> However, what this really boils down to is that you and Peter don't
> like this line of code:
>
> +               tss->buflen1 = TYPEALIGN(TEXTBUFLEN, len1);

I can only speak for myself, though I agree with your summary here.

> What would you like it to say instead?
>
> The obvious formulation is:
>
> while (len1 < tss->buflen1)
>     tss->buflen *= 2;

That's what I had in mind. +1.

> Or perhaps the following, which will normally be more efficient,
> though possibly not as efficient as what I've got there now:
>
> tss->buflen = 1 << ffs(len1);

I'm sorry, I don't follow you here. What is ffs() ?

-- 
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [PATCH] XLogReader v2
Следующее
От: Robert Haas
Дата:
Сообщение: Re: sortsupport for text