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

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: In PG12, query with float calculations is slower than PG11
Дата
Msg-id 20200206055531.esv5bhzfhtqrsd2w@alap3.anarazel.de
обсуждение исходный текст
Ответ на In PG12, query with float calculations is slower than PG11  (keisuke kuroda <keisuke.kuroda.3862@gmail.com>)
Ответы Re: In PG12, query with float calculations is slower than PG11  (Amit Langote <amitlangote09@gmail.com>)
Список pgsql-hackers
Hi,

On 2020-02-06 14:25:03 +0900, keisuke kuroda wrote:
> That's because check_float8_val() (in PG 12) is a function
> whose arguments must be evaluated before
> it is called (it is inline, but that's irrelevant),
> whereas CHECKFLOATVAL() (in PG11) is a macro
> whose arguments are only substituted into its body.

Hm - it's not that clear to me that it is irrelevant that the function
gets inlined. The compiler should know that isinf is side-effect free,
and that it doesn't have to evaluate before necessary.

Normally isinf is implemented by a compiler intrisic within the system
headers. But not in your profile:
> ★ 5.41%  postgres  libc-2.17.so       [.] __isinf

I checked, and I don't see any references to isinf from within float.c
(looking at the disassembly - there's some debug strings containing the
word, but that's it).

What compiler & compiler version on what kind of architecture is this?

Greetings,

Andres Freund



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

Предыдущее
От: Surafel Temesgen
Дата:
Сообщение: Re: [PATCH v1] Allow COPY "text" format to output a header
Следующее
От: Andy Fan
Дата:
Сообщение: Re: [PATCH] Erase the distinctClause if the result is unique by definition