Igor Schein on Fri, 7 Jan 2000 19:54:48 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

optimization flags


Hi,

a couple of remarks about gcc default optimization flags.  First of
all,  -fexpensive-optimizations doesn't need to be used because
it's automatically  turned on by -O2 and higher.  Second, my
measurements indicated that -O3 is faster than -O2 on Solaris.  The
only difference between them is that -finline-functions is added with
-O3, which clearly improves speed.  I don't know why it's
traditionally been -O2 on Solaris, but I think it should be changed
now. 

In addition, -fomit-frame-pointer flag is always desirable for
optimized binary because it saves some unneeded instructions.
And finally, -frunroll-loops and -funroll-all-loops could also be
beneficial, but I will need to verify that.

Igor