This is the mail archive of the gcc-help@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: speed of g++ v3


Wei Qin <wqin@EE.Princeton.EDU> writes:

> Hi,
> 
> 	I compile my code with g++ v3.0.4 with -O3. But the code is
> running 20% slower than the code compiled with g++ v2.96 -O3.
> 	Why is there such huge speed difference and is there any way for
> me to regain speed?

IIRC, gcc 3.0.x have some issues with -O3 and inlining. Compile your
code with -O2 and the performance will improve. However, there are
certain cases where gcc 3.0 performance is worse than gcc 2.95 no
matter what optimization level you use for gcc 3.0.x. Those cases are
rare.

-- 
Oscar


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