Re: Weird function behavior from Sept 11 snapshot

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Weird function behavior from Sept 11 snapshot
Дата
Msg-id 7490.968771661@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Weird function behavior from Sept 11 snapshot  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Список 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 по дате отправления:

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: Weird function behavior from Sept 11 snapshot
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: Weird function behavior from Sept 11 snapshot