Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Scott Locklin <locklin@gabor.lbl.gov>
Subject: Re: compiler efficency
Date: Mon, 27 Jan 1997 14:13:30 -0800 (PST)	[thread overview]
Message-ID: <199701272213.OAA03645@gabor.lbl.gov> (raw)
In-Reply-To: <199701272037.VAA20864@servix.us.es>

> 
>  Hi all,
> 
> we just got a PC164 system and I did some benchmarks with our Fortran
> programs over here. One of the test-programs is a simple loop
> doing (output of f2c): 
> for (i = 2; i <= i__1; ++i) {
>         gam += 1. / (doublereal) i;
> }
> Now, the Fortran-program compiled with the Digital Unix (f77) compiler executes
> TWICE as fast as the gcc executable (I found this factor also in other
> programs). I have read that the gcc math libraries are not very fast,
> but I do not understand why this simple loop is that slow with gcc. So my
> questions:
>  1)  Any ideas why ? (This is Redhat 4.0). 

Well, I don't have your original source code, and I don't have a 21164 to 
check it on, but I would guess instruction scheduling is the culprit.
21164 is theoretically capable of 4 instructions per cycle, but they have 
to be scheduled properly or no go. Doubtless DEC has put more effort into 
this than GNU, and understands the issues and trickies rather more than 
GNU folks.
gprof looks neato. You could also use DMT's cycle checker bit o code to 
see where the cycles are taken up. (There are timer registers on the 
Alpha for this purpose).

-SL

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

  parent reply	other threads:[~1997-01-27 22:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-01-27 20:37 compiler efficency Claus Denk
1997-01-27 20:35 ` Brett McCormick
1997-01-27 20:37 ` Lev D Gelb
1997-01-27 21:15 ` Jim Nance
1997-01-27 22:13 ` Scott Locklin [this message]
1997-01-27 22:41 ` Michal Jaegermann
1997-01-27 23:35 ` Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
1997-01-27 20:51 Robert Williams
1997-01-27 21:48 Toon Moene
1997-01-27 22:15 Przemek Klosowski
1997-01-27 22:41 Craig Burley
1997-01-28 11:22 Claus Denk
1997-01-28 20:02 Toon Moene
1997-01-28 23:23 Huw Davies
     [not found] <9701282002.AA15294@moene.indiv.nluug.nl>
1997-01-29  0:10 ` Michal Jaegermann
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox