Dear all, I am trying to implement pch for scons under linux. But get some funny results. Using src/mathed as an example, make file (pch on) takes 87s, scons (pch off) takes 89s, and scons (pch on) takes 102s. Maybe src/mathed is not a good example, but
1. Has anyone seriously tested the performance difference with autotools, with/without PCH? What is the performance gain? 2. Can anyone have a look at my calling sequqnce and see if I am using pch in a correct way? scons (no pch): scons: Building targets ... g++ -o debug/common/mathed/math_makeboxinset.o -c -g -Wall -O -Iboost -Isrc src/mathed/math_makeboxinset.C g++ -o debug/common/mathed/math_tfracinset.o -c -g -Wall -O -Iboost -Isrc src/mathed/math_tfracinset.C ... scons (with pch): scons: Building targets ... g++ -Idebug/common/mathed -Isrc/mathed -Iboost -Isrc -x c++-header src/mathed/pch.h -o debug/common/mathed/pch.h.gch g++ -o debug/common/mathed/math_makeboxinset.o -c --include=src/mathed/pch.h -Winvalid-pch -g -Wall -O -Idebug/common/mathed -Isrc/mathed -Iboost -Isrc src/mathed/math_makeboxinset.C ... One possible problem is that I try to build .h.gch to the build directory (not source directory) and add -Idebug/common/mathed so that g++ can find pch.h.gch. I do not really know if this is necessary. Cheers, Bo