help-gplusplus
[Top][All Lists]
Advanced

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

Re: using -O3 options with g++


From: Jeff Schwab
Subject: Re: using -O3 options with g++
Date: Wed, 28 Oct 2009 18:21:17 -0400
User-agent: Thunderbird 2.0.0.23 (Macintosh/20090812)

ami wrote:
hi all i am new to gcc compiler. for my one of application on 64 bit
linux machine i have a doubt whether i should use -O3 or -O2 for
better performance.
as i read in documentation of gcc, -O3 is told to be higher in size
and higher in performance compare to -O2.
but -O3 defaults options enable functions with 600 lines to be inlined
and it breaks the code in huge scale. so is it ok to deliver final
executable with -O3 options or using -O2 as most favoured by
programmer earlier.

also i want to know which one is most prefered by linux programming
professional these days ?

Profile. Most of these optimizations are just heuristics; there's no guarantee that one optimization level will be faster/smaller than another.


reply via email to

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