This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Faster compilation speed


Noel Yap wrote:

Build speeds are most helped by minimizing the number
of files opened and closed during the build.

Is this assertion based on empirical measurement, and if so, for what
source code and what system?  For instance, the longest source file
in GCC is about 15K lines, and at -O2, only a small percentage of
time is spent messing with files.  If I use -save-temps on cp/decl.c on
one of my (Linux) machines, I get a total time of about 38 sec from
source to asm.  If I just compile decl.i, it's about 37 sec, so that's
1 sec for *all* preprocessing, including all file opening/closing.

Obviously, other programs will have different characteristics, and if
you have one for which file opening/closing dominates compile time,
that will be very interesting.  But it's bad to try to optimize
something before you have numerical evidence.

Stan





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]