This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Performance loss from RedHat 7.0 to RedHat 9.0
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: Jean-Marc Petit <petit at obs-besancon dot fr>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 16 Feb 2004 21:39:49 +0100
- Subject: Re: Performance loss from RedHat 7.0 to RedHat 9.0
- Organization: Moene Computational Physics, Maartensdijk, NL
- References: <Pine.LNX.4.44.0402110952390.18069-100000@zebu.obs-besancon.fr>
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 ?
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc.gnu.org/fortran/ (under construction)