On Mon, Mar 25, 2013 at 11:09 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> From: Noah Lavine <noah.b.lavine@gmail.com>
> Date: Mon, 25 Mar 2013 10:58:28 -0400
> Cc: Paul Eggert <eggert@cs.ucla.edu>, Andreas Schwab <schwab@linux-m68k.org>,
>       Emacs development discussions <Emacs-devel@gnu.org>
>
> To continue a tangent, if adding an explicit isnan() makes the code run any
> slower, I think you should file a bug with GCC to get that fixed.

I don't think GCC is a problem: isnan is a builtin function there, so
even a function call overhead is spared.


Oh, that's good. I didn't know how it was implemented.

I mean that GCC should be able to convert ((x > 0) || isnan(x)) to !(x <= 0) if the second expression is actually faster. It seems like a fairly simple rewrite.