>I read from the article posted at
>that using "-x03" will give better optimization compared the
>optimization flag "-O" for C++ code.
>I would like to get your suggestions also about this. How effective
>will it be in case if I go for "-xO3" instead of "-O". Improving the
>code is the best way to get better performance is a well-known fact.
>Hence, I don't invite any argument about that in this thread. I would
>like to know it only from the compiler point of view.
The only way to be sure is to try it and see. The different optimization
levels use various techniques to optimize the code. There are often
trade-offs (size for speed being the most common, e.g., inlining
functions and unrolling loops). Whilst the higher the optimization, the
faster the code *in general*, there are always cases where specific bits
of code will run faster at a lower optimization level.
Furthermore, as has already been mentioned, the more aggressive the
optimization, the higher the risk that the compiler will generate
something that won't work.
Paul Floyd http://paulf.free.fr (for what it's worth)
What happens if you have lead in your pants as well as lead in your pencil?