LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 704|回复: 1

CFLAGS, From Gentoo wiki

[复制链接]
发表于 2005-9-4 20:55:38 | 显示全部楼层 |阅读模式
-O2

Is the next level of optimization. It turns on all optimizations that don't largely increase the size of the binary or interfere with debugging. -O2 is even better than -O, and just as safe. This is the optimization level is most commonly used for most packages in the Linux world, and is the optimization level that is used for the Linux kernel. If you want a fast system that "just works", -O2 is probably good for you.
[edit]
-O3

Will enable all of the optimizations specified by -O2 plus the -finline-functions and -frename-registers optimizations. However, these should not be used on a system with low memory or drive space. The end binary output will probably be larger, and may not be any faster. In fact, it may slow down the program since larger binaries takes longer to load from the hard drive into the memory and the hard drive is a bottleneck even on fast computers. It will also cause larger memory usage and possibly cache misses on CPUs with a low amount of cache (celeron for ex.). This optimization level is known to break some program


刚刚在Gentoo Wiki上看到的,呵呵,还是不要用-O3了,改-O2吧。
原文http://gentoo-wiki.com/CFLAGS
发表于 2005-9-5 11:53:13 | 显示全部楼层
呵呵,我是只用-O3,不用-O2的。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表