Re: Re: Abbreviated keys for Numeric

From: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Re: Abbreviated keys for Numeric
Date: 2015-01-27 18:49:31
Message-ID: 54C7DDBB.90403@archidevsys.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 28/01/15 06:29, Andrew Gierth wrote:
>>>>>> "Peter" == Peter Geoghegan <pg(at)heroku(dot)com> 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 results were not consistent between versions; the latest
> I tried (4.9) showed float8 as somewhat faster, while 4.7 showed float8
> as slightly slower; the difference was all in the time of the float8
> case, the time for numeric was virtually the same.
>
> For one specific test query, taking the best time of multiple runs,
>
> float8: gcc4.7 = 980ms, gcc4.9 = 833ms
> numeric: gcc4.7 = 940ms, gcc4.9 = 920ms
>
> (vs. 650ms for bigint on either version)
>
> So honestly I think abbreviation for float8 is a complete red herring.
>
> Also, I couldn't get any detectable benefit from inlining
> DatumGetFloat8, though I may have to play more with that to be certain
> (above tests did not have any float8-related modifications at all, just
> the datum and numeric abbrevs patches).
>
Since gcc5.0 is due to be released in less than 3 months, it might be
worth testing with that.

Cheers,
Gavin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2015-01-27 18:58:42 Re: proposal: row_to_array function
Previous Message Tom Lane 2015-01-27 18:40:21 Re: jsonb, unicode escapes and escaped backslashes