Peter Kümmel wrote: > Andre Poenitz wrote: >> More data, mathed this time. >> >> 'Lumped' means a Mathed.C #include'ing everything else. >> >> Times are real/user/sys. >> >> Now Lumped >> >> Null build 2.6/1.4/0.9 1.6/1.3/0.3 >> >> Full rebuild 154/132/12 48/ 44/ 1 >> >> change MathParser.C 12/1.5/1 48/ 44/ 1 >> >> So lumping everything together buys more than 30% in the common case of >> a Null and 60% for Full builds. The downside is when actually _working_ >> on single files in mathed, where there's an increas of 300%. > > We could introduce a mechanism to manually remove some files from the > lumped files. Then one has the lumped files for all the untouched code > and a handfull files which will be compiled separate. > > Any ideas for this 'mechanism'?
const_files.cpp: #define ASSUME_COST_file1 #define ASSUME_COST_file2 #define ASSUME_COST_file3 #ifndef GET_CONST_FILES_DEFINES #ifdef ASSUME_COST_file1 #include "file1.cpp" #endif #ifdef ASSUME_COST_file2 #include "file2.cpp" #endif #ifdef ASSUME_COST_file3 #include "file3.cpp" #endif #endif //GET_CONST_FILES_DEFINES non_const_files.cpp: #define GET_CONST_FILES_DEFINES #include "const_files.cpp" #ifndef ASSUME_COST_file1 #include "file1.cpp" #endif #ifndef ASSUME_COST_file2 #include "file2.cpp" #endif #ifndef ASSUME_COST_file3 #include "file3.cpp" #endif Then by building both files and by undefining a ASSUME_CONST macro we have the speedup for both cases. And the best is that it is possible to generate these files while configuring. Peter