speed of g++ v3

Wei Qin wqin@EE.Princeton.EDU
Sun Jul 21 11:51:00 GMT 2002


Thanks for the reply. Now I try with -O2, but see no difference.
The code is as slow. My platform is x86 linux.

Wei


> 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