optimization documentation

Eljay Love-Jensen eljay@adobe.com
Wed Oct 29 18:03:00 GMT 2003


Hi Nathan,

To figure out what the differences are between the various optimization settings, do this:

touch foo.cpp
g++ -O2 -save-temps -fverbose-asm -c foo.cpp
cat foo.s

Replace "-O2" with the one(s) that you are interested in.  Compare the differences in the .s files.  Make sure you save the foo.s that you are interested to compare against... :-)

Spiffy!  (This was previously posted on this forum; I did not figure it out on my own.)

HTH,
--Eljay




More information about the Gcc-help mailing list