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