Voila ce que ça donne sur mon P4 2,26Ghz 1Go RAM :
D'abord avec CFLAGS = -O6:
Using 2.00 seconds min time per kenel.
Composite Score: 339.07
FFT Mflops: 193.80 (N=1024)
SOR Mflops: 335.71 (100 x 100)
MonteCarlo: Mflops: 31.51
Sparse matmult Mflops: 508.03 (N=1000, nz=5000)
LU Mflops: 626.30 (M=100, N=100)
Ensuite avec CFLAGS = -O3 -funroll-all-loops -fomit-frame-pointer -ffast-math
Using 2.00 seconds min time per kenel.
Composite Score: 421.51
FFT Mflops: 270.84 (N=1024)
SOR Mflops: 331.09 (100 x 100)
MonteCarlo: Mflops: 56.63
Sparse matmult Mflops: 550.72 (N=1000, nz=5000)
LU Mflops: 898.25 (M=100, N=100)
Il y a un sacré gain de performance ; les options donnent des écarts > 25% pour le même compilo !! De là à trouver les 15% annoncés entre gcc et ic++ significatives, j'ai comme un doute sur la méthodologie ..
Ma machine : cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 2.26GHz
stepping : 4
cpu MHz : 2254.026
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips : 4495.76
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
À tout hasard j'ai aussi essayé avec gcc 3.2.1 et les options -O3 -funroll-all-loops -fomit-frame-pointer -ffast-math ; curieusement ça le fait moins pour les 2 derniers tests ;
il doit y avoir de nouvelles options qui vont bien .. quelqu'un me les donne ?
Using 2.00 seconds min time per kenel.
Composite Score: 422.33
FFT Mflops: 261.11 (N=1024)
SOR Mflops: 320.09 (100 x 100)
MonteCarlo: Mflops: 59.92
Sparse matmult Mflops: 650.48 (N=1000, nz=5000)
LU Mflops: 820.02 (M=100, N=100)
[^] # Les options, ça change tout :
Posté par Ptah . En réponse à la dépêche Comparatif Intel C++ 7.0 / Gcc 3.2.1. Évalué à 2.
D'abord avec CFLAGS = -O6:
Using 2.00 seconds min time per kenel.
Composite Score: 339.07
FFT Mflops: 193.80 (N=1024)
SOR Mflops: 335.71 (100 x 100)
MonteCarlo: Mflops: 31.51
Sparse matmult Mflops: 508.03 (N=1000, nz=5000)
LU Mflops: 626.30 (M=100, N=100)
Ensuite avec CFLAGS = -O3 -funroll-all-loops -fomit-frame-pointer -ffast-math
Using 2.00 seconds min time per kenel.
Composite Score: 421.51
FFT Mflops: 270.84 (N=1024)
SOR Mflops: 331.09 (100 x 100)
MonteCarlo: Mflops: 56.63
Sparse matmult Mflops: 550.72 (N=1000, nz=5000)
LU Mflops: 898.25 (M=100, N=100)
Il y a un sacré gain de performance ; les options donnent des écarts > 25% pour le même compilo !! De là à trouver les 15% annoncés entre gcc et ic++ significatives, j'ai comme un doute sur la méthodologie ..
Ma machine : cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 2.26GHz
stepping : 4
cpu MHz : 2254.026
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips : 4495.76
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)
À tout hasard j'ai aussi essayé avec gcc 3.2.1 et les options -O3 -funroll-all-loops -fomit-frame-pointer -ffast-math ; curieusement ça le fait moins pour les 2 derniers tests ;
il doit y avoir de nouvelles options qui vont bien .. quelqu'un me les donne ?
Using 2.00 seconds min time per kenel.
Composite Score: 422.33
FFT Mflops: 261.11 (N=1024)
SOR Mflops: 320.09 (100 x 100)
MonteCarlo: Mflops: 59.92
Sparse matmult Mflops: 650.48 (N=1000, nz=5000)
LU Mflops: 820.02 (M=100, N=100)