[分享]intel sse3 使用 gcc和icc10.1的比较

编译打包和其他
回复
czj
帖子: 88
注册时间: 2008-01-28 12:48

[分享]intel sse3 使用 gcc和icc10.1的比较

#1

帖子 czj » 2008-09-13 6:21

测试环境
* Q6600(B3) @ 3.21GHz
* 400Mhz FSB (266Mhz northbridge strap)
* 2GB PC3-15000 1603Mhz (8-8-8-24)
* kernel 2.6.24-gentoo-r3 (kernel lock preemption and preemptible kernel model, 1000Hz timer freq, see config)

编译参数
# GCC 4.1.2 (-march=nocona -O3 -pipe -msse3)
# GCC 4.2.3 (-march=nocona -O3 -pipe -msse3)
# GCC 4.3.0-pre20080302 (-march=core2 -O3 -pipe -mssse3)
# ICC 10.1 20080112 (-O3 -xT -ipo -gcc)

图片

图片

文章出处
http://blog.alphagemini.org/2008/03/icc-vs-gcc-43.html
头像
kofshower
帖子: 1343
注册时间: 2007-03-13 11:23
联系:

#2

帖子 kofshower » 2008-09-13 7:47

-march=nocona -mtune=nocona -mfpmath=sse,387 [-mmmx -msse -msse2 -msse3 -m3dnow] -minline-all-stringops -pipe -O3 -fomit-frame-pointer -fforce-addr -finline-functions -finline-limit=800 -fmove-all-movables -freduce-all-givs -freorder-blocks -freorder-functions -fexpensive-optimizations -falign-functions -falign-labels -falign-loops -falign-jumps -frename-registers -fweb -funit-at-a-time -funroll-loops -fprefetch-loop-arrays -ffunction-sections -fdata-sections -fbranch-target-load-optimize -fbranch-target-load-optimize2
这才是gcc最大优化,一般emerge的时候,还是稳定为主
"We are all in the mud, but some of us are looking at the stars." (Oscar Wilde)
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/
czj
帖子: 88
注册时间: 2008-01-28 12:48

#3

帖子 czj » 2008-09-13 18:25

稳定是一个复杂的系统工程。
Intel cpu动辄40%以上的超频能力,没理由怀疑icc的编译参数会让intel系统不稳定。
主流CPU厂商对编译器的开发力度可以预见会越来越大。
头像
kofshower
帖子: 1343
注册时间: 2007-03-13 11:23
联系:

#4

帖子 kofshower » 2008-09-13 20:18

不是的,具体的说吧,我想表达这种意思,gcc也可以很快,可是在最优化编译的时候牺牲了可移植性。比如在其他cpu的会出现未支持的指令集。所以大多数软件都没有必要在执行期性能上做太多优化。经常加载的程序,倒是可以优化大小。
icc我记得要收费吧。
"We are all in the mud, but some of us are looking at the stars." (Oscar Wilde)
We are not born for ourselves.
人生天地间,并非为自己
Homepage:http://sites.google.com/site/polarisnotme/
头像
zhuqin_83
帖子: 10606
注册时间: 2006-05-13 4:02
联系:

#5

帖子 zhuqin_83 » 2008-09-13 20:24

最新的gcc4.3.2可以试一下。另外,-O3不一定有-O2快,-march=xxx不如-march=native快。-fomit-frame-pointer是一定要的,否则可以慢很多。再测试一下估计相差就不大了。
HP Pavilion DV6-2064CA: AMD Turion II Ultra Dual-Core Mobile M640, HD4650, 2GBx2 DDR2-800, Seagate 500GB 7200RPM SATA, BD-ROM
DELL UltraSharp 2209WA
Arch64, Testing repo
回复