lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Compiling takes longer with gcc-4.9.2


From: Vadim Zeitlin
Subject: Re: [lmi] Compiling takes longer with gcc-4.9.2
Date: Tue, 22 Dec 2015 02:33:16 +0100

On Tue, 22 Dec 2015 00:28:44 +0000 Greg Chicares <address@hidden> wrote:

GC> It takes three times as long, which is not an argument in favor of
GC> upgrading. Can we improve the build time?

 I am pretty sure that using PCH will do it. I still didn't have to
actually test/benchmark it but I did just test building (just) wxWidgets
itself with "make -j8" in Win7 VM: it takes 398 seconds with 3.4.5 and 487
with 4.9.2 meaning that the new compiler is still slower, but not by nearly
as much as for you. Of course, wx configure does enable the use of PCH for
g++4.

GC> I can't figure out why the best result comes from '--jobs=4'. If the
GC> number of CPUs isn't the bottleneck, what is? disk? RAM? CPU cache?

 No idea neither. All I can say is that for me all 8 virtual CPUs are
consistently pegged during the compilation stage while the linking stage
(which is quite long) only runs on a single CPU but also consumes maximal
amount of disk bandwidth, so I don't even know what limits it more.

GC> The bottom line:
GC>   3:19 = 199s gcc-3.4.5, std=gnu++98
GC>   7:32 = 452s gcc-4.9.2, std=c++03
GC>   9:18 = 558s gcc-4.9.2, std=c++11

 I'm afraid these numbers have to be just accepted. IME every new version
of g++ is slightly slower than the next previous one and apparently this is
what such cumulative slowdown results in, over 10 years. I suspect the
difference might be smaller with -O0 instead of -O2 as gcc optimizer has
become vastly more sophisticated (and hence time consuming) since gcc3
days, perhaps you could use -O0 while developing? If not, I think only the
PCH can save us.

GC> This (4.9.2) is the latest MinGW-w64 package that Cygwin offers (they
GC> have 4.9.3 and 5.2.0 versions that target Cygwin, not MinGW). Here:
GC>   http://sourceforge.net/projects/mingw-w64/
GC> a 4.9.4-20151215 version is offered; would that native build be better
GC> for us? (I'm not really sure how their Cygwin package differs.)

 Yes, it probably would, Cygwin emulation does have its overhead, but I
don't know by how much. I could try if you'd like to and are not already
doing this.

 Please let me know,
VZ

reply via email to

[Prev in Thread] Current Thread [Next in Thread]