pgsql: Use isinf builtin for clang, for performance.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use isinf builtin for clang, for performance.
Date: 2018-03-28 20:20:58
Message-ID: E1f1HZ4-0003yg-NA@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use isinf builtin for clang, for performance.

When compiling with clang glibc's definition of isinf() ends up
leading to and external libc function call. That's because there was a
bug in the builtin in an old gcc version, and clang claims
compatibility with an older version. That causes clang to be
measurably slower for floating point heavy workloads than gcc.

To fix simply redirect isinf when using clang and clang confirms it
has __builtin_isinf().

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8a934d6778331f2ac04a40f4f22178a56a232315

Modified Files
--------------
src/include/port.h | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2018-03-28 20:30:41 pgsql: Add EXPLAIN support for JIT.
Previous Message Fujii Masao 2018-03-28 19:59:37 pgsql: Make pg_rewind skip files and directories that are removed durin