This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ performance
- To: Burkhard Militzer <militzer at llnl dot gov>
- Subject: Re: C++ performance
- From: Paolo Carlini <pcarlini at unitus dot it>
- Date: Wed, 04 Jul 2001 01:37:10 +0200
- CC: gcc at gcc dot gnu dot org
- Organization: Universita' della Tuscia
- References: <Pine.LNX.4.33.0107031534020.30074-100000@dresden.llnl.gov>
- Reply-To: pcarlini at unitus dot it
Hi,
without knowing some details of your "open_paths" code I'm afraid that even the
real gcc-gurus (I'm just an user) would not be able to do much...
Anyway, I'm following this kind of discussions since a few months and there are
some recurring themes which perhaps may be helpful for you to know (I do not
enter here in the many improvements already implemented or under study for 3.1)
1\ The g++ inliner bundled with gcc3.0.x is, so to speak, not very smart, so very
often it is not rewarding to compile with -O3 vs -O2 in terms of build time vs
run time trade-off.
2\ It is often suggested to check the effect of the -fno-gcse switch.
So, for the benefit of everyone I think, you may consider testing those 3
combinations of switches (-O2 -fno-gcse, -O3 -fno-gcse, -O2) and then report
about your results.
Cheers,
Paolo.
Burkhard Militzer wrote:
> Hello,
>
> I installed various versions of your GNU g++ compile on my Pentium IV and
> compared the performance:
>
> Test A1 "open_paths" (cd open_path; /bin/time ~/cupid/cupid open) [small mem]
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> (Pentium 4 1.7Ghz) g++ -O3 (2.95-2 *** ) 8.62 sec.
> (Pentium 4 1.7Ghz) g++ -O3 (2.95-3) 10.94 sec.
> (Pentium 4 1.7Ghz) g++ -O3 (3.01) 15.09 sec.
>
> Test A2 "open_paths" (cd open_path; /bin/time ~/cupid/cupid open2) [small mem]
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> (Pentium 4 1.7Ghz) g++ -O3 (2.95.2 ***) 85.44 sec.
> (Pentium 4 1.7Ghz) g++ -O3 (2.95.3) 107.79 sec.
> (Pentium 4 1.7Ghz) g++ -O3 (3.01) 144.87 sec.
>
> (***) executable was compiled on Pentium 3.
>
> The time to execute the 2 benchmarks (the results were all consistent)
> seems to get worse with increasing version number. Is there anything that
> can be done about it?
>
> Furthermore, the compile time of version 3.01 is very long.
>
> Thanks
>
> Burkhard Militzer