Re: Weird function behavior from Sept 11 snapshot - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Weird function behavior from Sept 11 snapshot
Date
Msg-id 7490.968771661@sss.pgh.pa.us
Whole thread Raw
In response to Re: Weird function behavior from Sept 11 snapshot  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
List pgsql-hackers
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
> How about using int8 for the accumulator (on machines which support it
> of course)? Falling back to float8 or numeric on other machines?

int8 would still pose some overflow risk (at least for int8 input),
and would likely be no faster than a float8 implementation, since
both would require palloc().

Your test suggests that the performance differential is *at most*
2X --- probably much less in real-world situations where the disk
pages aren't already cached.  I can't get excited about introducing
platform-dependent behavior and overflow risk for that.  If it were
10X then I would, but right now I think we are OK as is.  I think
any speedup efforts here would be better put into making NUMERIC
ops go faster ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: Weird function behavior from Sept 11 snapshot
Next
From: Thomas Lockhart
Date:
Subject: Re: Weird function behavior from Sept 11 snapshot