Richard Guenther wrote:
On Tue, Jun 1, 2010 at 12:00 PM, Richard Guenther
<richard.guent...@gmail.com> wrote:
On Mon, May 31, 2010 at 6:22 PM, Diego Novillo <dnovi...@google.com> wrote:
Now that the SC and the FSF have agreed to this, we should decide whether we
switch and how.  So, I would like comments on the following questions:

1- Should we switch to C++?
Yes.

2- What is the cost in terms of build time?
I was trying to measure but --enable-build-with-cxx is broken at
the moment.

After fixing build locally I now have

../configure && /usr/bin/time make
9197.01user 367.66system 2:42:39elapsed 98%CPU (0avgtext+0avgdata
2846176maxresident)k
1664096inputs+22984320outputs (537major+193300027minor)pagefaults 0swaps

../configure --enable-stage1-languages=c,c++ && /usr/bin/time make
9954.58user 412.32system 2:55:20elapsed 98%CPU (0avgtext+0avgdata
2846160maxresident)k
1386568inputs+26276920outputs (511major+219861615minor)pagefaults 0swaps

8% for adding C++ to the set of languages bootstrapped

../configure --enable-build-with-cxx && /usr/bin/time make
10072.37user 426.85system 2:57:15elapsed 98%CPU (0avgtext+0avgdata
2847472maxresident)k
1408096inputs+22940928outputs (377major+223161175minor)pagefaults 0swaps

1.5% for using C++ to do the building.

That is a really small increase for building time.

I was interested more in how much g++ is slower gcc in -O2 mode.

I've done such comparison for gcc & g++ compilation time on most GCC C files (from gcc directory) and got in average 10% (when gcc/g++ of version 4.6 were used) - 20% (when gcc/g++ of version 4.3 were used) more compiler time when g++ is used. The used gcc/g++ compilers were build in release mode and the used machine was Corei7.


Reply via email to