|
|
-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 |
|