This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: speed of g++ v3
- From: Wei Qin <wqin at EE dot Princeton dot EDU>
- To: gcc-help at gcc dot gnu dot org
- Date: Sun, 21 Jul 2002 14:51:42 -0400 (EDT)
- Subject: Re: speed of g++ v3
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
>
>