public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Kahlert <martin.kahlert@mchp.siemens.de>
To: axp-list@redhat.com
Cc: scr@iis.fhg.de, robert@physiol.med.tu-muenchen.de, egcs@cygnus.com
Subject: Re: Performance measurements (thanks and conclusion)
Date: Thu, 25 Jun 1998 03:09:00 -0000	[thread overview]
Message-ID: <19980625094618.A26562@keksy.mchp.siemens.de> (raw)
In-Reply-To: <19980624170051.21290@haegar.physiol.med.tu-muenchen.de>

Quoting Robert Wilhelm (robert@physiol.med.tu-muenchen.de):
> > [Robert: could you please compile my code on your Alpha using
> >          egcs and report your results to me]
> 
> I get about 275 MFLOPS for my 533MHz 21164a for both egcs 1.0 and
> egcs-current with haifa enabled.
> 
> If I use different local variables lfA*, egcs seems to shedule a bit
> better and I get 290 MFLOPS.
> 
> Robert

I was really overwhelmed with the repsonse to this thread on 
axp-list. Thanks a lot for all people who tried my source
and even tried to get more out of the compilers.

I tried both versions on my PPro 200:
Stefan Schroepfer's version:
pgcc:
85.98 MFLOPS
gcc-2.7.2.1:
97.10 MFLOPS
gcc-without double align:
95.46 MFLOPS
egcs-2.91.42:
84.06 MFLOPS
tcc:
17.20 MFLOPS

Robert Wilhelm's version:
pgcc:
81.62 MFLOPS
gcc-2.7.2.1:
98.81 MFLOPS
gcc-without double align:
98.81 MFLOPS
egcs-2.91.42:
83.44 MFLOPS
tcc:
16.44 MFLOPS

It seems that tcc is not the fastest and the most reliable 
under the sun...

Can i conclude, that it's a good idea to insert as many local
vars as possible to get good results from compilers?

Now i have two questions:

-Why is it so difficult for gcc to transform the code
 for(i=0;i<n;i++)
    result[i]=a[i]+2*a[i+1]+3*a[i+2];

 into something like

 _tmp0=a[0];_tmp1=a[1];_tmp2=a[2];
 for(i=0;i<n;i++)
    {
     result[i]=_tmp0+2*_tmp1+3*_tmp2;
     _tmp0=_tmp1;
     _tmp1=_tmp2;
     _tmp2=a[i+2];
    }
 for itself? I think, especially in Fortran such things are a
 common task.
-What's the reason for the performace loss between gcc-2.7.2.1 
 and egcs-2.91.42 - it's nearly 20%, that gcc-2.7.2.1 is better?

Thanks a lot,
Martin.

  parent reply	other threads:[~1998-06-25  3:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-24  2:28 Performance measurements Martin Kahlert
1998-06-24  8:51 ` David S. Miller
1998-06-24 10:08 ` Gerald Pfeifer
1998-06-25  3:09 ` Jeffrey A Law
     [not found] ` <3590D5AE.167EB0E7@iis.fhg.de>
     [not found]   ` <19980624124843.A15248@keksy.mchp.siemens.de>
     [not found]     ` <3591031A.2781E494@iis.fhg.de>
     [not found]       ` <19980624170051.21290@haegar.physiol.med.tu-muenchen.de>
1998-06-25  3:09         ` Martin Kahlert [this message]
1998-06-26  1:05 ` Aubert Pierre
1998-06-27  2:25   ` Jeffrey A Law
1998-06-29 22:34 ` Rask Ingemann Lambertsen
1998-07-01  3:42   ` Nicholas Lee
1998-07-01 21:20 ` Marc Lehmann
1998-07-02  7:14   ` Craig Burley
1998-07-02 22:44     ` Marc Lehmann
1998-07-03  7:20       ` Toon Moene
1998-07-02 15:15   ` Joern Rennecke
1998-06-26  6:07 Performance measurements (thanks and conclusion) N8TM

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=19980625094618.A26562@keksy.mchp.siemens.de \
    --to=martin.kahlert@mchp.siemens.de \
    --cc=axp-list@redhat.com \
    --cc=egcs@cygnus.com \
    --cc=robert@physiol.med.tu-muenchen.de \
    --cc=scr@iis.fhg.de \
    /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).