Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Compiler speed for floating point applications.
@ 1997-06-13 13:21 Ken Haste Andersen
  0 siblings, 0 replies; 3+ messages in thread
From: Ken Haste Andersen @ 1997-06-13 13:21 UTC (permalink / raw)


Hi all,

I have a 500 MHz PC164. I run floating point intensive calculations
compiled with g77 (-ffast-math -funroll-loops -fno-f2c -O3). These run
approx 2 times the speed of a 180 MHz Ppro, which is a bit slower that
what is to be expected. Therefore I tried to compile the programs under
Digital Unix, using their f77 compiler (-O4 -arch ev5), and transfering
the code to my Linux station. Surprise! - a factor of two in speed
increase!

Is g77 (and then gcc) really that bad for floating point apps.?

Ken

-----------------------------------------------------------------------
 Ken Haste Andersen, stud. PhD. at:
  CATS: Niels Bohr Instituttet	  	ISVA: DTU
	Blegdamsvej 17			      Bygning 115
	DK-2100 OE			      DK-2800 Lyngby
 	Tlf.: +45 3532 5430		      Tlf.: +45 4525 1420
	Fax:  +45 3532 5425		      Fax:  +45 4593 2860
                
        E-mail: kenand@nbi.dk                 http://www.nbi.dk/~kenand
------------------------------------------------------------------------

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Compiler speed for floating point applications.
       [not found] <Pine.OSF.3.95.970613151538.20962A-100000@alf.nbi.dk>
@ 1997-06-13 13:28 ` Lev D Gelb
  1997-06-13 15:35 ` Michal Jaegermann
  1 sibling, 0 replies; 3+ messages in thread
From: Lev D Gelb @ 1997-06-13 13:28 UTC (permalink / raw)


On Fri, 13 Jun 1997, Ken Haste Andersen wrote:
> I have a 500 MHz PC164. I run floating point intensive calculations
> compiled with g77 (-ffast-math -funroll-loops -fno-f2c -O3). These run
> approx 2 times the speed of a 180 MHz Ppro, which is a bit slower that
> what is to be expected. Therefore I tried to compile the programs under
> Digital Unix, using their f77 compiler (-O4 -arch ev5), and transfering
> the code to my Linux station. Surprise! - a factor of two in speed
> increase!
> 
> Is g77 (and then gcc) really that bad for floating point apps.?
> 
> Ken
> 
> -----------------------------------------------------------------------

I did the same thing with a 433 MHz PC164, and my own 
floating-point intensive code.  I found that g77-optimized
code ran at about 85% the speed of DEC-f77-optimized code
(and nearly twice the speed of f2c+gcc optimized code!).

I think that these kinds of compiler performance questions are
very dependent on the program involved.  
(BTW, my compiler options for g77 were 
"FFLAGS = -ff77 -ffast-math -O2 -C", and for DEC f77 the same
as yours, except with the "statically linked" option.

Lev Gelb

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Compiler speed for floating point applications.
       [not found] <Pine.OSF.3.95.970613151538.20962A-100000@alf.nbi.dk>
  1997-06-13 13:28 ` Lev D Gelb
@ 1997-06-13 15:35 ` Michal Jaegermann
  1 sibling, 0 replies; 3+ messages in thread
From: Michal Jaegermann @ 1997-06-13 15:35 UTC (permalink / raw)


> 
> Therefore I tried to compile the programs under
> Digital Unix, using their f77 compiler (-O4 -arch ev5), and transfering
> the code to my Linux station. Surprise! - a factor of two in speed
> increase!
> 
> Is g77 (and then gcc) really that bad for floating point apps.?

No, not really, but your libraries may be and/or your program is
written in a way which is good enogh for DU compiler f77 optimizations
but g77 is not smart enough.  Performance gains from what you did vary
very widely from a program to program.

It is hard to be specific, but before jumping to any conclusions
check an article by David Mosberger-Tang
  http://www.linuxexpo.org/1997/after/papers/davidm/paper-html/
on the topic.  It is an eye-opener. :-)

There is no doubt that f77 from Digital, and its libraries, are today
better than g77.  This gap is not likely to diminish until interested
parties sit down and start writing a code.  I am pretty sure that
various library routines used in Fortran programs need work.  All this
"free software" is a cooperative effort and is is hard to expect that
"they" will do everything.

  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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1997-06-13 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-06-13 13:21 Compiler speed for floating point applications Ken Haste Andersen
     [not found] <Pine.OSF.3.95.970613151538.20962A-100000@alf.nbi.dk>
1997-06-13 13:28 ` Lev D Gelb
1997-06-13 15:35 ` Michal Jaegermann

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