* speed of g++ v3
@ 2002-07-21 10:17 Wei Qin
2002-07-21 10:29 ` Oscar Fuentes
0 siblings, 1 reply; 3+ messages in thread
From: Wei Qin @ 2002-07-21 10:17 UTC (permalink / raw)
To: gcc-help
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?
thanks in advance,
Wei
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: speed of g++ v3
2002-07-21 10:17 speed of g++ v3 Wei Qin
@ 2002-07-21 10:29 ` Oscar Fuentes
2002-07-21 11:51 ` Wei Qin
0 siblings, 1 reply; 3+ messages in thread
From: Oscar Fuentes @ 2002-07-21 10:29 UTC (permalink / raw)
To: Wei Qin; +Cc: gcc-help
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: speed of g++ v3
2002-07-21 10:29 ` Oscar Fuentes
@ 2002-07-21 11:51 ` Wei Qin
0 siblings, 0 replies; 3+ messages in thread
From: Wei Qin @ 2002-07-21 11:51 UTC (permalink / raw)
To: gcc-help
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
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-07-21 18:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-21 10:17 speed of g++ v3 Wei Qin
2002-07-21 10:29 ` Oscar Fuentes
2002-07-21 11:51 ` Wei Qin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).