| From: | Peter Geoghegan <pg(at)heroku(dot)com> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: B-Tree support function number 3 (strxfrm() optimization) |
| Date: | 2014-09-15 17:55:56 |
| Message-ID: | CAM3SWZQWLeQR9AkTJ+ndv6zxwF1p+r3KNoZ_sr1HvAJYuzC7vA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Sep 15, 2014 at 10:53 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> I think there's probably more than that to work out, but in any case
> there's no harm in getting a simple optimization done first before
> moving on to a complicated one.
I guess we never talked about the abort logic in all that much detail.
I suppose there's that, too.
> I rather assume we could reuse the results of the first memcmp()
> instead of doing it again.
>
> x = memcmp();
> if (x == 0)
> return x;
> y = strcoll();
> if (y == 0)
> return x;
> return y;
Of course, but you know what I mean. (I'm sure the compiler will
realize this if the programmer doesn't)
--
Peter Geoghegan
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2014-09-15 17:56:03 | Re: Triconsistent catalog declaration |
| Previous Message | Robert Haas | 2014-09-15 17:53:06 | Re: B-Tree support function number 3 (strxfrm() optimization) |