This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Large slowdown with gfortran vs f77 (x7)
- From: James Cloos <cloos at jhcloos dot com>
- To: Jeremy Sanders <jss at ast dot cam dot ac dot uk>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 08 Sep 2009 15:27:32 -0400
- Subject: Re: Large slowdown with gfortran vs f77 (x7)
- Copyright: Copyright 2009 James Cloos
- Openpgp: ED7DAEA6; url=http://jhcloos.com/public_key/0xED7DAEA6.asc
- Openpgp-fingerprint: E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6
- References: <h7qjpa$dhu$1@ger.gmane.org>
>>>>> "Jeremy" == Jeremy Sanders <jss@ast.cam.ac.uk> writes:
Jeremy> You can see the very large speed differences by telling gfortran
Jeremy> to always use double precision numbers.
Jeremy> This can be replicated with this simple program:
Jeremy> Compiled with gfortran -O2:
Jeremy> real 0m29.921s
Jeremy> user 0m29.912s
Jeremy> sys 0m0.000s
Jeremy> Compiled with gfortran -O2 -fdefault-real-8:
Jeremy> real 0m4.306s
Jeremy> user 0m4.304s
Jeremy> sys 0m0.000s
Jeremy> This is with a newly built gcc 4.4.1 on Fedora 10 (glibc 2.9), x86-64.
I tried it on my 1Ghz PIII laptop running Gentoo with gcc 4.1.1 and
glibc 2.10.1.
I added -march=pentium3 to the gcc cmd line; that probably made little
difference. (glibc was also compiled with -march=pentium3 -O2).
I got nearly identical user times for the two compiles; user time was
always within 0.03 of 23.40 over multiple runs.
Incidently, while the real-8 compile output 271828665.96115601, the
real4 compile output 67108976.
This does, then, seem to be an x86-64 issue.
-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6