|speeding up compile times in C++ firstname.lastname@example.org (1995-01-26)|
|Re: speeding up compile times in C++ email@example.com (1995-01-26)|
|Re: speeding up compile times in C++ firstname.lastname@example.org (1995-01-29)|
|Re: speeding up compile times in C++ email@example.com (1995-02-02)|
|Re: speeding up compile times in C++ firstname.lastname@example.org (Steve Glass) (1995-02-03)|
|Re: speeding up compile times in C++ email@example.com (1995-02-04)|
|Re: speeding up compile times in C++ firstname.lastname@example.org (Ronald F. Guilmette) (1995-02-04)|
|[4 later articles]|
|From:||email@example.com (Amir Michail)|
|Keywords:||C++, performance, question|
|Organization:||CS Lab, University of Toronto|
|Date:||Thu, 26 Jan 1995 07:17:41 GMT|
One problem with writing large C++ projects is that changing one or two
header files often results in much of the project being recompiled. This
is partly due to the class hierarchies and derivation.
I was thinking of a way around this problem. The motivation is that
changing .h files should not cause any .c files to recompile unless these
files were also changed.
The idea is for the compiler to maintain a .i file along with any .h file
that gives information about how the .o files were created. In
particular, if I declare a structure taking x bytes, then the compiler
generates code that gives the structure 2x bytes.
Now, if I change the structure later on by reordering variables, adding
and/or deleting variables, then the compiler checks the .i file to see how
the .o files were created, and automatically reorders items or pads
structures in the .h file so that the ordering of old items is identical
to that in the .o file. Thus, previously compiled code will still work
with new code compiled with the new .h file. Obviously, if the structure
grows to twice its original size, then all .c files that depend on the .h
file must be recompiled with twice the new size of the structure.
Would this idea work? Would it improve compilation times?
Return to the
Search the comp.compilers archives again.