Note that there are some explanatory texts on larger screens.

plurals
  1. PONo speedup with precompiled headers on gcc (but large speedup with visual studio)
    primarykey
    data
    text
    <p>I'm working on a large project that must builds under multiple environment, chiefly linux/gcc and windows/msvc. To speed up the build, we use precompiled headers.</p> <p>The Windows implementation is very efficient: on my quad-core hyperthreaded i7 build time goes down from 9 minutes to 1.5 minutes. However using precompiled headers doesn't seem to improve performance: in both cases it builds in 22 minutes under a virtual box on the same computer, or about 40 minutes on a real server.</p> <p>So I'm thinking the obvious, that I somehow got something wrong and that the precompiled header isn't kicking in. I can't find what however.</p> <p>Our Makefiles are generated by CMake, so I can copy paste the code used to compile the header and the object files that uses them.</p> <p>Creating the header:</p> <pre><code>/usr/bin/c++ -O3 -DNDEBUG --no-warnings "-I/mnt/code/server a/src/game" "-I/mnt/code/server a/src/game/vmap" "-I/mnt/code/server a/dep/include/g3dlite" "-I/mnt/code/server a/dep/include" "-I/mnt/code/server a/src/shared" "-I/mnt/code/server a/src/framework" "-I/mnt/code/server a/buildlinux" "-I/mnt/code/server a/buildlinux/src/shared" -I/usr/include/mysql "-I/mnt/code/server a/dep/acelite" -DDO_MYSQL -DHAVE_CONFIG_H -DVERSION=\"0.6.1\" -DSYSCONFDIR=\"../etc/\" -D_RELEASE -D_NDEBUG -x c++-header -o "/mnt/code/server a/buildlinux/src/game/pchdef.h.gch" "/mnt/code/server a/src/game/pchdef.h" </code></pre> <p>Compiling an object file:</p> <pre><code>/usr/bin/c++ $(CXX_DEFINES) $(CXX_FLAGS) "-I/mnt/code/server a/buildlinux/src/game" -include pchdef.h -Winvalid-pch -o CMakeFiles/game.dir/AccountMgr.cpp.o -c "/mnt/code/server a/src/game/AccountMgr.cpp" </code></pre> <p>Insights are appreciated, even if they don't directly derive from the snippets above.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload