public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joost VandeVondele <jv244@hermes.cam.ac.uk>
To: Robert Dewar <dewar@gnat.com>
Cc: gcc@gcc.gnu.org
Subject: Re: (a+b)+c should be replaced by a+(b+c)
Date: Thu, 25 Mar 2004 15:32:00 -0000	[thread overview]
Message-ID: <Pine.SOL.4.58.0403251409340.18567@yellow.csi.cam.ac.uk> (raw)
In-Reply-To: <4062E287.4010007@gnat.com>

>
> > No, I'm only happy there are compilers that make my code 100 times faster
> > without doing a lot of work myself, keeping my code easy to maintain and
> > read.
>
> Well it is fine to have this kind of transformation available as an
> option, though in general it is better to rely on BLAS written by
> competent numerical programmers, than on transformations of unknown
> impact.
>
Obviously, this was an example (and I referred to calling blas
explicitly), to suggest that there exists a wide range of computational
kernels that benefit from (a+b)+c->a+(b+c) being performed by the
compiler. (I realized that there are much better example of this, but
anyway).

I like the name transformation as much as I dislike unsafe-math. FYI the
following warning comes from IBM (at -O3 when optimizing, oops
transforming, expressions in a way that might lead to non-bitwise
identical results), and I think it is not badly worded :

"mytest.f90", 1500-036 (I) The NOSTRICT option (default at OPT(3)) has the
potential to alter the semantics of a program.  Please refer to
documentation on the STRICT/NOSTRICT option for more information.

Joost

  reply	other threads:[~2004-03-25 14:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-25 12:03 Joost VandeVondele
2004-03-25 14:45 ` Robert Dewar
2004-03-25 15:07   ` Joost VandeVondele
2004-03-25 15:18     ` Robert Dewar
2004-03-25 15:32       ` Joost VandeVondele [this message]
2004-03-25 15:59     ` Scott Robert Ladd
2004-03-25 16:18       ` Jakub Jelinek
2004-03-25 16:38         ` Scott Robert Ladd
2004-03-25 19:47           ` Laurent GUERBY
2004-03-25 20:16             ` Scott Robert Ladd
2004-03-26  2:51         ` Gabriel Paubert
2004-03-26  3:17           ` Jakub Jelinek

Reply instructions:

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

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

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.SOL.4.58.0403251409340.18567@yellow.csi.cam.ac.uk \
    --to=jv244@hermes.cam.ac.uk \
    --cc=dewar@gnat.com \
    --cc=gcc@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).