[Top][All Lists]

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

Re: [lmi] PCH (was: Upgrading to gcc-4.9.2)

From: Vadim Zeitlin
Subject: Re: [lmi] PCH (was: Upgrading to gcc-4.9.2)
Date: Thu, 17 Dec 2015 17:48:45 +0100

On Thu, 17 Dec 2015 05:14:31 +0000 Greg Chicares <address@hidden> wrote:

GC> On 2015-12-17 02:28, Greg Chicares wrote:
GC> > gcc-3.4.5 was released 2005-11-30, just over ten years ago. It's high
GC> > time we upgraded. It's also time to forsake the moribund mingw.org and
GC> > migrate to MinGW-w64
GC> My first impression from looking at our unit tests is that MinGW-w64's
GC> snprintf() and rounding functions may be of lower quality than
GC> mingw.org's. We might want to import those parts of the mingw.org
GC> sources into lmi.

 This is really strange, don't both of them just use snprintf() from the
Microsoft CRT?

GC> The build time changes dramatically. Here's a recent clean build with
GC> gcc-3.4.5:
GC>   dual E5520, HDD = 2TB WD caviar black, 3 GBPS SATA II motherboard
GC>   32-bit msw-xp guest in qemu-kvm
GC>   3:19 with '--jobs=16' vs. 17:55 without parallelism
GC> Contrast that with this clean build I just ran on the same system with
GC> gcc-4.9.2, using the same command:
GC>   $time make $coefficiency install check_physical_closure >../log 2>&1
GC>   1078.15s user 808.14s system 193% cpu 16:12.84 total

 This is horrible but at this point not using precompiled headers becomes
just an exercise in self-flagellation. MSVS compiles even faster than g++
3.4.5, but I still use PCH with it. And compiling with PCH and g++ 5 takes
much, much less than 1000 seconds on a much slower system. Can I please
resurrect the patch adding PCH support to lmi once the build works?

 In addition to the performance gains, it would also save me some time I
have to spend to carefully manually remove the PCH-related code from any
new files I add on my working branches before submitting them or, on the
contrary, to add it to any new files on the trunk before I can build them
with MSVS.

 So I'd really like to be able to do it, especially as the changes are
really minor and are basically just this, for all files:

---------------------------------- >8 --------------------------------------
diff --git a/emit_ledger.cpp b/emit_ledger.cpp
index 71d3de1..a784d23 100644
--- a/emit_ledger.cpp
+++ b/emit_ledger.cpp
@@ -21,8 +21,8 @@

 // $Id$

+#include LMI_PCH_HEADER
 #ifdef __BORLANDC__
-#   include "pchfile.hpp"
 #   pragma hdrstop
 #endif // __BORLANDC__

---------------------------------- >8 --------------------------------------

 I will do the tests to with the PCH to let you know how much faster
exactly does this make the build go.


reply via email to

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