Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
Subject: Re: compiler efficency
Date: Mon, 27 Jan 1997 15:41:26 -0700 (MST)	[thread overview]
Message-ID: <199701272241.PAA08082@ellpspace.math.ualberta.ca> (raw)
In-Reply-To: <199701272037.VAA20864@servix.us.es>

> 
> 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

Just a word of caution.  Benchmarking a quite complicated system on a loop
like that (or something like the famous "sieve") has a value on par with
the BogoMips indicator.  It tells you only that this loop runs faster or
slower in some circumstances.  It might (note: MIGHT) indicate that
an instruction scheduler and branch prediction in DEC compiler is better
than in gcc (it is highly likely that this is the case :-) but without
a detailed analysis even that cannot be concluded.  You even skipped an
information what optimizer flags, if any, were used in both compilations.
gcc without optimizations is **designed** to output a very simple-minded
code.  DEC Fortran compiler is likely, for example, to unroll loops by
default; you will not get that in gcc unless explicitely requested.

> (I found this factor also in other programs).

This is a bit more significant, although in an absence of what these
programs were and how they were compiled is still of a limited value.

It is known that gcc support for alpha, libraries and g77 (the next
release apparently should be "alpha ready" - RSN) needs work.  But
**they** - meaning developers - likely can use some help.  In any
case boundaries between developers and users in FSF projects are not
so well defined as in other circumstances. :-)

There is also something which is a "porting bug" in f2c - IMHO.
If you will look closer you will notice that basic Fortran types
of REAL*4 and INTEGER*4 are really 8 bytes wide on Alpha.
This may have some effect on speed and creates porting headaches -
especially if a "legacy code" is a mixture of Fortran and C.
The issue can be dealt with but is likely beyond a grasp of many
Fortran programmers. :-)

All in all, I would not mind seeing at last g77 running correctly on
alpha. :-)

  Michal

--
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:41 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
1997-01-27 22:41 ` Michal Jaegermann [this message]
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