M
Melzzzzz
This program
http://shootout.alioth.debian.org/u64q/program.php?test=spectralnorm&lang=gpp&id=6
is faster when compiling without optimisations
centos 6.3, gcc 4.4.6, Q6600 @ 2.4Ghz
[bmaxa@bmaxa spectral-norm]$ g++ -Wall -O0 -msse2 -fopenmp spectral.cpp -o spectralcpp
spectral.cpp:10:1: warning: multi-line comment
[bmaxa@bmaxa spectral-norm]$ time ./spectralcpp 5500
1.274224153
real 0m1.996s
user 0m7.963s
sys 0m0.004s
[bmaxa@bmaxa spectral-norm]$ g++ -Wall -O3 -msse2 -fopenmp spectral.cpp -o spectralcpp
spectral.cpp:10:1: warning: multi-line comment
[bmaxa@bmaxa spectral-norm]$ time ./spectralcpp 5500
1.274224153
real 0m2.528s
user 0m10.090s
sys 0m0.005s
ubuntu 12.04, gcc 4.6.3, i5 3570k @ 4Ghz
bmaxa@maxa:~/shootout/spectral-norm$ g++ -Wall -fopenmp -O0 -msse2 spectral.cpp -o spectralcpp
spectral.cpp:10:1: warning: multi-line comment [-Wcomment]
bmaxa@maxa:~/shootout/spectral-norm$ time ./spectralcpp 5500
1.274224153
real 0m0.799s
user 0m3.040s
sys 0m0.000s
bmaxa@maxa:~/shootout/spectral-norm$ g++ -Wall -fopenmp -O3 -msse2 spectral.cpp -o spectralcpp
spectral.cpp:10:1: warning: multi-line comment [-Wcomment]
bmaxa@maxa:~/shootout/spectral-norm$ time ./spectralcpp 5500
1.274224153
real 0m1.186s
user 0m4.536s
sys 0m0.000s
(I tried with gcc 4.7 and snapshot 4.8 same result)
curiosly, 32 bit version optimizer works
bmaxa@maxa:~/shootout/spectral-norm$ g++ -Wall -fopenmp -O3 -m32 -msse2 spectral.cpp -o spectralcpp
spectral.cpp:10:1: warning: multi-line comment [-Wcomment]
bmaxa@maxa:~/shootout/spectral-norm$ time ./spectralcpp 5500
1.274224153
real 0m0.635s
user 0m2.368s
sys 0m0.004s
So what do you think? Is it bug in 64 bit optimizer or something which
I overlooked?
Thanks
http://shootout.alioth.debian.org/u64q/program.php?test=spectralnorm&lang=gpp&id=6
is faster when compiling without optimisations
centos 6.3, gcc 4.4.6, Q6600 @ 2.4Ghz
[bmaxa@bmaxa spectral-norm]$ g++ -Wall -O0 -msse2 -fopenmp spectral.cpp -o spectralcpp
spectral.cpp:10:1: warning: multi-line comment
[bmaxa@bmaxa spectral-norm]$ time ./spectralcpp 5500
1.274224153
real 0m1.996s
user 0m7.963s
sys 0m0.004s
[bmaxa@bmaxa spectral-norm]$ g++ -Wall -O3 -msse2 -fopenmp spectral.cpp -o spectralcpp
spectral.cpp:10:1: warning: multi-line comment
[bmaxa@bmaxa spectral-norm]$ time ./spectralcpp 5500
1.274224153
real 0m2.528s
user 0m10.090s
sys 0m0.005s
ubuntu 12.04, gcc 4.6.3, i5 3570k @ 4Ghz
bmaxa@maxa:~/shootout/spectral-norm$ g++ -Wall -fopenmp -O0 -msse2 spectral.cpp -o spectralcpp
spectral.cpp:10:1: warning: multi-line comment [-Wcomment]
bmaxa@maxa:~/shootout/spectral-norm$ time ./spectralcpp 5500
1.274224153
real 0m0.799s
user 0m3.040s
sys 0m0.000s
bmaxa@maxa:~/shootout/spectral-norm$ g++ -Wall -fopenmp -O3 -msse2 spectral.cpp -o spectralcpp
spectral.cpp:10:1: warning: multi-line comment [-Wcomment]
bmaxa@maxa:~/shootout/spectral-norm$ time ./spectralcpp 5500
1.274224153
real 0m1.186s
user 0m4.536s
sys 0m0.000s
(I tried with gcc 4.7 and snapshot 4.8 same result)
curiosly, 32 bit version optimizer works
bmaxa@maxa:~/shootout/spectral-norm$ g++ -Wall -fopenmp -O3 -m32 -msse2 spectral.cpp -o spectralcpp
spectral.cpp:10:1: warning: multi-line comment [-Wcomment]
bmaxa@maxa:~/shootout/spectral-norm$ time ./spectralcpp 5500
1.274224153
real 0m0.635s
user 0m2.368s
sys 0m0.004s
So what do you think? Is it bug in 64 bit optimizer or something which
I overlooked?
Thanks