This is the mail archive of the
mailing list for the GCC project.
Re: Apple's -fast option for gcc
> 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.
> 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.
As I understand it the number of levels refers to the scope the
optimisations work in. -O1 is within basic blocks, -O2 is between basic
blocks, -O3 is across the entire function. Ofcourse not all
optimisations can be categorised like this and so have been fitted to
the nearest appropriate level.
> If people feel that the existing -O3 level is useful, then what about
> adding -O4?
-O4 is under development, see "Architecture for a Next-Generation GCC"
> 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."
This ideally requires an HPC mode. As far as I know; despite several
suggestions there isn't currently a GCC/HPC project.
<< .sig file removed for cleaning >>