This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Apple's -fast option for gcc


Mike Stump <mrs@apple.com> writes:

> -fast is very, very small.  It just turns on 5-25 other, existing flags.
> There isn't a reason why it could not be contributed.  Do others want
> it?  It is _good_ for SPEC.  That is the intent and the primary purpose.
> It may give people ideas on what things may help certain types of
> programs, but, like any benchmark, your mileage may vary.  I don't think
> we were going to submit it, rather, all the work under it, and
> hopefully, get that into other options, or new options, as appropriate.
> Another option besides -fast, would be for the documentation for the
> compiler to give the current, best known SPEC flags.

I'm just a user of GCC, not a developer, so please take the following with
a grain of salt.  But having watched this mailing list for quite a while,
my impression is that -O3, without special consideration for the code
being compiled and tweaking with other flags, is mostly useless right now.
-O2 is generally faster than -O3, and -O3 really doesn't turn on that much
that isn't already turned on by -O2.

Forgive me if that's an inaccurate impression; it's just an overall guess
accumulated from a lot of individual posts, rather than hard numbers.

If this is, indeed, the case, then rather than adding a new optimization
option, why not take the flags that are appropriate for optimization from
-fast and turn that into -O3?  That would both fix a bug and maintain
consistency at the same time.

If people feel that the existing -O3 level is useful, then what about
adding -O4?

I'd feel a little odd about seeing a new optimization option that works
differently from the existing optimization options; it's already hard
enough for the average user to figure out what to use for "please make
this code go fast even if it takes you longer to compile it."

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]