speed of g++ v3

Oscar Fuentes ofv@wanadoo.es
Sun Jul 21 10:29:00 GMT 2002


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



More information about the Gcc-help mailing list