Re: Performance loss from RedHat 7.0 to RedHat 9.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 16 Feb 2004, Toon Moene wrote:

> Jean-Marc Petit wrote:
> 
> > I just noticed a strong decrease of efficiency in code produced by G77 
> > when moving from the RedHat 7.0 version (can't recall the version, it's no 
> > longer on my computer) to RedHat 9.0.
> 
> > Hardware: Athlon 1.0GHz, 512 MB RAM
> > 
> > RedHat 7.0:
> > 
> > compiler command: g77 -u -O3 -ffastmath -funroll-loops -m486 -o bench bench.f
> > 
> > result of the "time" command:
> > 
> > real    0m37.415s
> > user    0m36.890s
> > sys     0m0.000s
> 
> but the following is slower:
> 
> > RedHat 9.0:
> > 
> > g77 -v gives: gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
> > 
> > compiler command: g77 -u -O3 -fno-automatic -funroll-loops -malign-double 
> > -march=athlon -ffast-math -o bench bench.f
> 
> Note that one of the differences is the -fno-automatic compile time 
> option in the latter example.  This might make a large difference, as it 
> instructs the compiler to treat all variables (even loop counts) to be 
> memory resident, instead of being able to live in registers.
> 
> Why do you need -fno-automatic with gcc-3.2.2 but not with the RedHat 
> 7.0 compiler ?
> 
Well, I tried wihtou the "-fno-automatic" option. It's marginally worth:

real    1m4.492s
user    1m4.390s
sys     0m0.000s

The reason I have this option is that I don't want to loose time 
re-creating the variables each time the program enters a subroutine. In 
the present case, I don't really need that, and the result is essentially 
the same. In some cases, I need to have it for the program to work. This 
replace having a SAVE statement in each and every subroutine. For example, 
I need this to compile and link with the PGPLOT library. Anyway, it seems 
this doesn't solve my problem. If you think it's worth it, I can send 
along my progam.

Reagrds, Jean-Marc Petit



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux