Re: B-Tree support function number 3 (strxfrm() optimization) - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: B-Tree support function number 3 (strxfrm() optimization)
Date
Msg-id CAM3SWZQWLeQR9AkTJ+ndv6zxwF1p+r3KNoZ_sr1HvAJYuzC7vA@mail.gmail.com
Whole thread Raw
In response to Re: B-Tree support function number 3 (strxfrm() optimization)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: B-Tree support function number 3 (strxfrm() optimization)
List pgsql-hackers
On Mon, Sep 15, 2014 at 10:53 AM, Robert Haas <robertmhaas@gmail.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



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Triconsistent catalog declaration
Next
From: Tom Lane
Date:
Subject: Re: jsonb contains behaviour weirdness