This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Should -fcross-jumping be part of -O1?
> >In fact I think we should have -Ofast/-Osize pair for users who want
> >such a specialzed one way tunning.
>
> A -Ofast1 and -Ofast2 could define different sets of switches known to
> produce fast code. Different pieces of code require different
> optimizations; what may optimize one algorithm may pessimize another.
>
> I'm working on a real-time video codec for a customer; it is *very*
> significant that I can improve the program's speed, with evolved
> options, by 25% or more over GCC's default optimization options.
>
> Wanting the fastest possible generated code is *not* a "specialized way
> of tuning." I find the "speed doesn't matter" attitude rather
> disturbing; it is part-and-parcel to the code-bloat now considered
> "acceptable" by a wide segment of the programming community. The best
This is really touchy issue. Many programmers consider size very
important, others unimportant.
I do agree that we need some set of options for people doing code like
codecs or similar engines (I made such code myself too).
I think -O3 in current scheme is closest to this definition. For
programs not having problems to fit in L1 chache it should more or less
consistently improve code speed.
It would be interesting what optimizations enabled by -O3 are usually a loss for
you.
Honza
> program is defined by the combination of efficient algorithms *and*
> effective code generation.
>
> ..Scott
>
> --
> Scott Robert Ladd
> Coyote Gulch Productions (http://www.coyotegulch.com)
> Software Invention for High-Performance Computing
> In development: Alex, a database for common folk