[Top][All Lists]

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

Re: What optimization level

From: Earl Purple
Subject: Re: What optimization level
Date: 11 Aug 2006 03:11:05 -0700
User-agent: G2/0.2

Christian Christmann wrote:

> Hi,
> my projects are written in C++ and I use g++ to compile them.
> What compiler optimization level (-Ox) should be used for the
> generation of the final binaries? I assume that the highest optimization
> level (-O3) is the right choice since it deploys most of the build-in
> compiler optimizations that reduce code size and average program
> execution time. Or are you of a different opinion?
> Regards,
> Chris

I guess it depends. If you want optimal size rather than speed (perhaps
the speed is adequate anyway) then -Os is your choice, plus perhaps
various -f settings for the inlining.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]