Optimization and flags for making a static library with g++
问题 I am just starting with g++ compiler on Linux and got some questions on the compiler flags. Here are they Optimizations I read about optimization flags -O1 , -O2 and -O3 in the g++ manual page. I didn't understood when to use these flags. Usually what optimization level do you use? The g++ manual says the following for -O2 . Optimize even more. GCC performs nearly all supported optimizations that do not involve a space-speed tradeoff. The compiler does not perform loop unrolling or function