One reason why Delphi may be faster to compile than C++ is that Delphi
has a
proper module system, whereas C++ still uses the old #include
preprocessor hack. The old #include hack has the drawbacks that the
meaning of each header file included may depend on what macros are in
scope at that point. So the effect of including header files in a
different order might be different. This makes precompilation of
header files much more difficult, complicated, and ineffective than
for Delphi (or Turbo Pascal) units. As a result,
C++ compilers tend to parse the headers each time they are read, rather than precompiling them.
Partager