Re: [HACKERS] Re: Abbreviated keys for Numeric

2015-01-31 Thread Robert Haas
On Sat, Jan 31, 2015 at 7:07 PM, Peter Geoghegan wrote: > I don't want to get bogged down on this - the numeric abbreviation > patch *is* still much more compelling - but maybe abbreviation of > float8 isn't a red herring after all. I'm completely on-board with doing something about numeric. I t

Re: [HACKERS] Re: Abbreviated keys for Numeric

2015-01-31 Thread Peter Geoghegan
On Mon, Jan 26, 2015 at 3:35 PM, Peter Geoghegan wrote: > I am not seriously suggesting pursuing abbreviation for float8 in the > near term - numeric is clearly what we should concentrate on. It's > interesting that abbreviation of float8 could potentially make sense, > though. Note that in the I

Re: [HACKERS] Re: Abbreviated keys for Numeric

2015-01-27 Thread Gavin Flower
On 28/01/15 06:29, Andrew Gierth wrote: "Peter" == Peter Geoghegan writes: Peter> What I find particularly interesting about this patch is that it Peter> makes sorting numerics significantly faster than even sorting Peter> float8 values, Played some more with this. Testing on some differ

Re: [HACKERS] Re: Abbreviated keys for Numeric

2015-01-27 Thread Andrew Gierth
> "Peter" == Peter Geoghegan writes: Peter> What I find particularly interesting about this patch is that it Peter> makes sorting numerics significantly faster than even sorting Peter> float8 values, Played some more with this. Testing on some different gcc versions showed that the result

Re: [HACKERS] Re: Abbreviated keys for Numeric

2015-01-26 Thread Petr Jelinek
On 27/01/15 00:51, Andres Freund wrote: On 2015-01-26 15:35:44 -0800, Peter Geoghegan wrote: On Mon, Jan 26, 2015 at 3:12 PM, Andrew Gierth wrote: Obvious overheads in float8 comparison include having to check for NaN, and the fact that DatumGetFloat8 on 64bit doesn't get inlined and forces a

Re: [HACKERS] Re: Abbreviated keys for Numeric

2015-01-26 Thread Andres Freund
On 2015-01-26 15:35:44 -0800, Peter Geoghegan wrote: > On Mon, Jan 26, 2015 at 3:12 PM, Andrew Gierth > wrote: > > Obvious overheads in float8 comparison include having to check for NaN, > > and the fact that DatumGetFloat8 on 64bit doesn't get inlined and forces > > a store/load to memory rather

Re: [HACKERS] Re: Abbreviated keys for Numeric

2015-01-26 Thread Peter Geoghegan
On Mon, Jan 26, 2015 at 3:12 PM, Andrew Gierth wrote: > Obvious overheads in float8 comparison include having to check for NaN, > and the fact that DatumGetFloat8 on 64bit doesn't get inlined and forces > a store/load to memory rather than just using a register. Looking at > those might be more be

Re: [HACKERS] Re: Abbreviated keys for Numeric

2015-01-26 Thread Andrew Gierth
> "Peter" == Peter Geoghegan writes: Peter> What I find particularly interesting about this patch is that it Peter> makes sorting numerics significantly faster than even sorting Peter> float8 values, I get a much smaller difference there than you do. Obvious overheads in float8 compariso

[HACKERS] Re: Abbreviated keys for Numeric (was: Re: B-Tree support function number 3 (strxfrm() optimization))

2015-01-26 Thread Peter Geoghegan
On Mon, Jan 26, 2015 at 8:43 AM, Andrew Gierth wrote: > Another spinoff from the abbreviation discussion. Peter Geoghegan > suggested on IRC that numeric would benefit from abbreviation, and > indeed it does (in some cases by a factor of about 6-7x or more, because > numeric comparison is no speed