From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | keisuke kuroda <keisuke(dot)kuroda(dot)3862(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: In PG12, query with float calculations is slower than PG11 |
Date: | 2020-02-06 05:55:31 |
Message-ID: | 20200206055531.esv5bhzfhtqrsd2w@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Andy Fan | 2020-02-06 06:01:27 | Re: [PATCH] Erase the distinctClause if the result is unique by definition |
Previous Message | Surafel Temesgen | 2020-02-06 05:53:29 | Re: [PATCH v1] Allow COPY "text" format to output a header |