lmi
[Top][All Lists]
Advanced

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

[lmi] Precompiled headers [Was: Compiling takes longer with gcc-4.9.2]


From: Greg Chicares
Subject: [lmi] Precompiled headers [Was: Compiling takes longer with gcc-4.9.2]
Date: Tue, 22 Dec 2015 13:21:11 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

On 2015-12-22 02:26, Greg Chicares wrote:
> On 2015-12-22 01:33, Vadim Zeitlin wrote:
>> 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.
> 
> IIRC, you worked on an lmi PCH patch a long time ago, but found that it
> wasn't worthwhile for gcc-3.4.5 . Do you happen to know whether there's
> a working patch in our email archives?

Vaclav tried it:

http://lists.nongnu.org/archive/html/lmi/2009-06/msg00022.html
| I tried to add precompiled headers support to LMI, with mixed results.
| That is, it works great for Visual C++ (cutting compilation time from 33
| minutes to 4 minutes in my VM), but it doesn't improve gcc compilation
| times (sometimes, it is a tiny bit faster, sometimes even a tiny bit
| slower).

Sounds like it won't help us. Here's a 2013-12-08 experiment [reformatted]:

https://bugzilla.mozilla.org/show_bug.cgi?id=347592
| Before: real 7m1.261s  user 35m28.100s sys 4m2.561s
| After:  real 6m37.862s user 34m14.911s sys 3m53.180s
| The gcc support doesn't still work.

Another, from 11-25-2011:

http://www.rtsoft.com/forums/showthread.php?4469-using-automake-with-gcc-precompiled-headers-experiment
| Without precompiled headers: 3m36.652s
| With precompiled headers: 3m9.320s
| Conclusion. The speed increase is not work the risk

I looked through the first hundred results of this search:
  https://www.google.com/search?q=gcc+pch
and found problems but no glowing recommendations. If PCH is not widely used
with gcc, then there's a danger that defects won't be found and addressed;
see this defect report from 2015-05-14:

http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2015-May/309242.html
| > As far as I remember, gcc from ports has some problems with precompiled
| > headers by itself.
[...]
| Also note that while this issue is appearing on 11, it has been a bug in GCC
| for over a decade IIRC. Just google for the issue and you'll find references 
to
| it for other systems as well. The GCC PCH errors did occur with FreeBSD <11
| with boost quite often for me as well. The changes in 11 just make it more
| consistently obviously broken.

I would tend to conclude that we shouldn't spend time on this.




reply via email to

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