With the attached sample code I get a substantial performance drop from 4.3.1
to either 4.4.1 or 4.5.0, same compiler option, same machine. To reproduce,
feed a size to the program (in the case below, 40000) and time the executable.
[sfili...@donald fgp_fmm_20091112]$ gfortran -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.3.1/configure --prefix=/usr/local/gcc43
--with-mpfr=/u
sr/local/mpfr --with-gmp=/usr/local/gmp
Thread model: posix
gcc version 4.3.1 (GCC)
[sfili...@donald fgp_fmm_20091112]$ gfortran -O3 -o try_eval eval.f90
[sfili...@donald fgp_fmm_20091112]$ time ./try_eval <<EOF
40000
EOF
real 0m10.871s
user 0m10.825s
sys 0m0.011s
[sfili...@donald fgp_fmm_20091112]$ module unload gnu43
[sfili...@donald fgp_fmm_20091112]$ module load gnu45
gnu45 - loads the GNU 4.5.0-pre compilers suite
Version 1.0
[sfili...@donald fgp_fmm_20091112]$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gnu45/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/
lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/usr/local/gnu45
--enable-languages=c
,c++,fortran : (reconfigured) ../gcc/configure --prefix=/usr/local/gnu45
--enabl
e-languages=c,c++,fortran : (reconfigured) ../gcc/configure
--prefix=/usr/local/
gnu45 --enable-languages=c,c++,fortran,lto --no-create --no-recursion :
(reconfi
gured) ../gcc/configure --prefix=/usr/local/gnu45
--enable-languages=c,c++,fortr
an,lto --no-create --no-recursion
Thread model: posix
gcc version 4.5.0 20091119 (experimental) (GCC)
[sfili...@donald fgp_fmm_20091112]$ gfortran -O3 -o try_eval eval.f90
[sfili...@donald fgp_fmm_20091112]$ time ./try_eval <<EOF
40000
EOF
real 0m23.935s
user 0m23.862s
sys 0m0.011s
[sfili...@donald fgp_fmm_20091112]$ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 16
model : 2
model name : AMD Athlon(tm) 7750 Dual-Core Processor
stepping : 3
cpu MHz : 2700.000
cache size : 512 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat
pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm
3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16
lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch
osvw ibs
bogomips : 5424.74
TLB size : 1024 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate
--
Summary: Performance drop from 4.3 to 4.4/4.5
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sfilippone at uniroma2 dot it
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42108