Thank you for your comments about GCC optimization levels.
I can assure you that it is no myth that -O6 generates bad code. That comment came about because I personally experienced the bad code. So there is some gcc version out there that does something special with -O6 and generates bad code. Sometimes net.folklore has some truth behind it!
Subsequent empirical testing on my part showed that -O2 and -O3 generated good code from the same compiler that generated bad code with -O6. Since the only reason why I used -O6 was that someone some time ago had said to use it, it was a no-brainer to go to -O2 or -O3.
I have no idea which version of the compiler it was, whether it was an "obsolete pgcc fork" or official or blurdybloop special. I just know that, years ago, someone told me to use -O6; and two years ago, I wasted a lot of time because that -O6 caused bad code to be generated.
After a few decades of such experiences, one becomes risk-adverse and goes with what may not necessarily be the best choice, but is guaranteed not to be the worst choice.
Similarly, I forget which platform, but it was reported that -O3 code can be slower. I guess it may be because the cache gets overwhelmed. Fortunately, as you seem to confirm, the potential benefits of -O3 seem to be not worth it.
I am glad to hear that in the current GCC the -O6 trap is gone. I am also glad to hear that -g now renders -no-omit-frame-pointer unnecessary. This was not always the case.
-- Mark -- http://panda.com/mrc Democracy is two wolves and a sheep deciding what to eat for lunch. Liberty is a well-armed sheep contesting the vote. _______________________________________________ Imap-uw mailing list [email protected] https://mailman1.u.washington.edu/mailman/listinfo/imap-uw
