Re: In PG12, query with float calculations is slower than PG11

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: In PG12, query with float calculations is slower than PG11
Дата
Msg-id CA+TgmobeuwC_3Lru88qZ04s_+OPsE9ZZfM8e_x5urT+FYs_hYA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: In PG12, query with float calculations is slower than PG11  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Feb 6, 2020 at 11:04 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> So it appears to me that what commit 6bf0bc842 did in this area was
> not just wrong, but disastrously so.  Before that, we had a macro that
> evaluated isinf(val) before it evaluated the inf_is_valid condition.
> Now we have check_float[48]_val which do it the other way around.
> That would be okay if the inf_is_valid condition were cheap to
> evaluate, but in common code paths it's actually twice as expensive
> as isinf().

Well, if the previous coding was a deliberate attempt to dodge this
performance issue, the evidence seems to be well-concealed. Neither
the comments for that macro nor the related commit messages make any
mention of it. When subtle things like this are performance-critical,
good comments are pretty critical, too.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Make ringbuffer threshold and ringbuffer sizes configurable?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: In PG12, query with float calculations is slower than PG11