Re: Weird function behavior from Sept 11 snapshot

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Mike Mascari <mascarm(at)mascari(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Weird function behavior from Sept 11 snapshot
Date: 2000-09-12 15:14:21
Message-ID: 7490.968771661@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2000-09-12 15:37:00 Re: Weird function behavior from Sept 11 snapshot
Previous Message Thomas Lockhart 2000-09-12 14:58:12 Re: Weird function behavior from Sept 11 snapshot