From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noah Lavine Newsgroups: gmane.emacs.devel Subject: Re: (0 <= i && i < N) is not "backwards" Date: Mon, 25 Mar 2013 11:28:11 -0400 Message-ID: References: <514F88E9.2020600@cs.ucla.edu> <83d2un3n7t.fsf@gnu.org> <515060C7.2070602@cs.ucla.edu> <83obe71qew.fsf@gnu.org> <83mwtr1pow.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec51dd60913abbc04d8c17536 X-Trace: ger.gmane.org 1364225321 8919 80.91.229.3 (25 Mar 2013 15:28:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Mar 2013 15:28:41 +0000 (UTC) Cc: Paul Eggert , Andreas Schwab , Emacs development discussions To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 25 16:29:04 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UK9KZ-0008Qf-Tb for ged-emacs-devel@m.gmane.org; Mon, 25 Mar 2013 16:29:04 +0100 Original-Received: from localhost ([::1]:48095 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK9KC-0004vO-47 for ged-emacs-devel@m.gmane.org; Mon, 25 Mar 2013 11:28:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK9K7-0004u7-O9 for Emacs-devel@gnu.org; Mon, 25 Mar 2013 11:28:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UK9K6-0002AZ-8W for Emacs-devel@gnu.org; Mon, 25 Mar 2013 11:28:35 -0400 Original-Received: from mail-pb0-f54.google.com ([209.85.160.54]:44800) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK9K4-0002A1-Al; Mon, 25 Mar 2013 11:28:32 -0400 Original-Received: by mail-pb0-f54.google.com with SMTP id rq13so197073pbb.27 for ; Mon, 25 Mar 2013 08:28:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=AXglpPbybesNg5A2kOz89Nx5e9XhOK6p48H+2cr9aMI=; b=fUH270eOM94YYOrsQm0h/UENU8v/gd5x+yudRpVrDas8nKfIwh0RXPRlCLxRfGhJva AHSiEtu2D21txkStALkfDszkeU9phj8yEgMwoZ0cd5BwI7A4qYKBOdKXQBpE6YifLUDi /J0n9LVP4Q7/dpxLrW0ZqLrply/M65jUKCdRCrtC2+nY3TmAwbAsO97wizyNVKjW4s+i F4Hc53xEWC2ItDTES+/h8vP6ix7z30jBEiR8DJBbAA6s1YDP4knfagN99mquwBaDNeaO C7eVCWUloHvI5WOQH2iOmkRNB7z11H2cBKoPg0d/viwj6IV/N1x4L/nRJ0HjeDtYaYhT YZPA== X-Received: by 10.66.21.72 with SMTP id t8mr570378pae.53.1364225311351; Mon, 25 Mar 2013 08:28:31 -0700 (PDT) Original-Received: by 10.68.157.42 with HTTP; Mon, 25 Mar 2013 08:28:11 -0700 (PDT) In-Reply-To: <83mwtr1pow.fsf@gnu.org> X-Google-Sender-Auth: 0NdVTOnbd2Ai-bxL5blA6vxXgd4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.160.54 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:158151 Archived-At: --bcaec51dd60913abbc04d8c17536 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Mar 25, 2013 at 11:09 AM, Eli Zaretskii wrote: > > From: Noah Lavine > > Date: Mon, 25 Mar 2013 10:58:28 -0400 > > Cc: Paul Eggert , Andreas Schwab < > schwab@linux-m68k.org>, > > Emacs development discussions > > > > 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. --bcaec51dd60913abbc04d8c17536 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



On Mon, Mar 25, 2013 at 11:09 AM, Eli Zaretskii &= lt;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.uc= la.edu>, Andreas Schwab <schwab@linux-m68k.org>,
> =A0 =A0 =A0 Emacs development discussions <Emacs-devel@gnu.org>
>
> To continue a tangent, if adding an explicit isnan() makes the code ru= n 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 im= plemented.

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