From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Peter Geoghegan <peter(at)2ndquadrant(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: sortsupport for text |
Date: | 2012-07-23 16:09:14 |
Message-ID: | CA+Tgmoaupz+g47xivEr0vrG19ENET1KiGQ5gKnw=kcc1wJYzBQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jul 23, 2012 at 12:07 PM, Peter Geoghegan <peter(at)2ndquadrant(dot)com> wrote:
> On 23 July 2012 16:36, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> On Mon, Jul 23, 2012 at 11:34 AM, Peter Geoghegan <peter(at)2ndquadrant(dot)com> wrote:
>>>> tss->buflen = 1 << ffs(len1);
>>>
>>> I'm sorry, I don't follow you here. What is ffs() ?
>>
>> Sorry, fls, not ffs. I always get those mixed up.
>>
>> See src/port/fls.c
>
> Oh, okay. Since, I infer, we're starting from a buffer-size that's a
> power-of-two anyway, is there really any advantage in doing this
> rather than just doubling the buffer size each time?
Well, if you're using a builtin fls rather than our src/port
implementation, it's probably a single machine language instruction
instead of a loop.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2012-07-23 16:13:04 | Re: [PATCH] XLogReader v2 |
Previous Message | Peter Geoghegan | 2012-07-23 16:07:18 | Re: sortsupport for text |