Re: Compile speed: Pascal(Delphi) vs C++

Fergus Henderson <fjh@cs.mu.oz.au>
11 Nov 2003 23:05:21 -0500

          From comp.compilers

Related articles
Compile speed: Pascal(Delphi) vs C++ Chavoux@yahoo.com (2003-11-11)
Re: Compile speed: Pascal(Delphi) vs C++ fjh@cs.mu.oz.au (Fergus Henderson) (2003-11-11)
Re: Compile speed: Pascal(Delphi) vs C++ lu.nn@wischik.com (Lucian Wischik) (2003-11-11)
Re: Compile speed: Pascal(Delphi) vs C++ marcov@stack.nl (Marco van de Voort) (2003-11-21)
Re: Compile speed: Pascal(Delphi) vs C++ robert.thorpe@antenova.com (Rob Thorpe) (2003-11-21)
Re: Compile speed: Pascal(Delphi) vs C++ vbdis@aol.com (2003-11-21)
Re: Compile speed: Pascal(Delphi) vs C++ randyhyde@earthlink.net (Randall Hyde) (2003-11-21)
Re: Compile speed: Pascal(Delphi) vs C++ marcov@stack.nl (Marco van de Voort) (2003-12-03)
[7 later articles]
| List of all articles for this month |

From: Fergus Henderson <fjh@cs.mu.oz.au>
Newsgroups: comp.compilers
Date: 11 Nov 2003 23:05:21 -0500
Organization: The University of Melbourne
References: 03-11-048
Keywords: performance, practice
Posted-Date: 11 Nov 2003 23:05:21 EST
X-Original-Trace: 12 Nov 2003 06:55:48 +1000, jupiter.cs.mu.oz.au

Chavoux@yahoo.com (Chavoux) writes:


>I am not familiar at all with the internals of the compilers of these
>languages, but I would like to know why this is the case?


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 Turbo Pascal units. As a result, C++ compilers tend to parse the
headers each time they are read, rather than precompiling them.


Our moderator writes:


>[It entirely depends on how the compiler's designed.


Not entirely -- it also depends on how the language was designed.
Some languages are easier to compile quickly than others.


--
Fergus Henderson <fjh@cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.