pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use isinf builtin for clang, for performance.
Date: Wed, 28 Mar 2018 20:20:58 +0000
Message-ID: <E1f1HZ4-0003yg-NA@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1f1HZ4-0003yg-NA@gemulon.postgresql.org>
Permalink:  ../E1f1HZ4-0003yg-NA@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1f1HZ4-0003yg-NA@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de
  Subject: Re: pgsql: Use isinf builtin for clang, for performance.
  In-Reply-To: <E1f1HZ4-0003yg-NA@gemulon.postgresql.org>
  References: <E1f1HZ4-0003yg-NA@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox