This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: speed of g++ v3
- From: Oscar Fuentes <ofv at wanadoo dot es>
- To: Wei Qin <wqin at EE dot Princeton dot EDU>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 21 Jul 2002 19:30:04 +0200
- Subject: Re: speed of g++ v3
- References: <Pine.SOL.4.43.0207211313560.23219-100000@ivy.ee.princeton.edu>
- Reply-to: gcc-help at gcc dot gnu dot org
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