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

vbdis@aol.com (VBDis)
21 Nov 2003 00:46:14 -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)
Re: Compile speed: Pascal(Delphi) vs C++ marcov@stack.nl (Marco van de Voort) (2003-12-03)
Re: Compile speed: Pascal(Delphi) vs C++ bobduff@shell01.TheWorld.com (Robert A Duff) (2003-12-03)
Re: Compile speed: Pascal(Delphi) vs C++ torbenm@diku.dk (2003-12-08)
Re: Compile speed: Pascal(Delphi) vs C++ joachim.durchholz@web.de (Joachim Durchholz) (2003-12-08)
[3 later articles]
| List of all articles for this month |

From: vbdis@aol.com (VBDis)
Newsgroups: comp.compilers
Date: 21 Nov 2003 00:46:14 -0500
Organization: AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com
References: 03-11-062
Keywords: performance
Posted-Date: 21 Nov 2003 00:46:13 EST

Fergus Henderson <fjh@cs.mu.oz.au> schreibt:


>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.


I also think that it's more a matter of the language than of the compiler. But
what exactly makes an Delphi compiler more than 10 times faster than an C/C++
compiler? Some ideas:


- the use of header files instead of precompiled units
- the extra C preprocessor stage and macro expansion
- C requires larger symbol tables
- C is harder to parse
- C is harder to optimize
- C source code for the same purpose is much longer(???)
- C is slow in text handling (provided the Delphi compiler is not written in C
;-)


Even if the use of header files seems to be the most important disadvantage of
C, some people say that it's the C syntax which makes the compilers so slow. I
tend to agree with the syntax issue, but without any proof, it's only a feeling
for now. The speed boost with precompiled header files is noticeable, but why?
Is it only lazyness why the use of header files has not been replaced by more
appropriate procedures, in the past decades? And is a C# compiler so much
faster than a C++ compiler, due to its use of precompiled assemblies? What
about incremental compilers?


Unfortunately the other topics cannot be verified, as long as the impact of the
header files cannot be separated from the other compiler activities. So I only
know that C is not an appropriate language for RAD, and no attempts, worth to
mention, have been made in the past to change that :-(




I also have no experience for a comparison of Turbo C with Turbo Pascal, but
Turbo C may have been faster than nowadays C++ compilers only due to the fewer,
simpler, shorter, and less nested header files of that time. At least I doubt
that it was the lack of optimization, which made Turbo C quite fast, because
then Delphi had to be quite slow for its much better optimization. Or is it so
much more complicated to optimize C programs, as opposed to Pascal/OPL code?


DoDi


Post a followup to this message

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