Compile speed: Pascal(Delphi) vs C++

Chavoux@yahoo.com (Chavoux)
11 Nov 2003 13:56:47 -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)
[8 later articles]
| List of all articles for this month |
From: Chavoux@yahoo.com (Chavoux)
Newsgroups: comp.compilers
Date: 11 Nov 2003 13:56:47 -0500
Organization: http://groups.google.com
Keywords: performance, practice, comment
Posted-Date: 11 Nov 2003 13:56:47 EST

Hi


A question: my brother wrote the same programme (fairly large and
using database and networking) in both Delphi and Borland C Builder.
Apparantly the C Builder version took huge ammounts of time to
compile. (So much so that he switched back to rewriting everything in
Delphi).


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? I have heard
a few times that C (and C++?) programs tend to be very fast at
runtime, but to compile slowly. Is this only a problem with the
specific implimentation (Borland) of the two languages? E.g. do Gnu
g++/gcc and Gbu Pascal compile equally fast? Or might it have
something to do with the fact that you always have to declare
variables before you use or initialize them in Pascal whereas you can
do it inline for C++? (I.o.w. maybe the Pascal is a real one-time pass
compiler, whereas C compromised on this somewhere along the line?) Or
does it have something to do with the OS and API... (i.e. C++ assume
the availability of the C libraries...available under linux, but not
by default in Windows...whereas Delphi's "libraries" are mostly
wrappers around the Windows API...so there is less actual code to
compile for the Delphi)? AFAIK static linking is always needed on
programmes written for Windows because you can't assume that the C
libraries will be available on the user's PC. These are just possible
causes I can think of (maybe totally off the mark), so please correct
me where my assumptions are wrong.


Regards
Chavoux
[It entirely depends on how the compiler's designed. Turbo C was very
fast but did only modest amounts of optimization. It looks like later
versions stopped paying attention to compile speed and concentrated on
optimizing. -John]


Post a followup to this message

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