Re: Speedy compilers

"Jack W. Crenshaw" <>
19 Nov 1998 23:24:30 -0500

          From comp.compilers

Related articles
Speedy compilers (Kirk Abbott) (1998-11-06)
Re: Speedy compilers (Janusz Szpilewski) (1998-11-15)
Re: Speedy compilers (1998-11-19)
Re: Speedy compilers (Jack W. Crenshaw) (1998-11-19)
Re: Speedy compilers (Toon Moene) (1998-11-21)
Re: Speedy compilers (Joachim Durchholz) (1998-11-24)
Re: Speedy compilers (Andrew Fry) (1998-11-24)
Re: Speedy compilers (Robert Bernecky) (1998-11-24)
Re: Speedy compilers (1998-11-30)
Re: Speedy compilers (Janusz Szpilewski) (1998-11-30)
[13 later articles]
| List of all articles for this month |

From: "Jack W. Crenshaw" <>
Newsgroups: comp.compilers
Date: 19 Nov 1998 23:24:30 -0500
Organization: Crenshaw Technologies
References: 98-11-047
Keywords: performance, comment

> Does anyone have any idea as to why the Delphi 3.0/4.0 compiler is so
> blindlingly fast ? On my last crude check it was approaching 800
> KLOC/minute. Apart from lcc does anyone know of any other fast
> compilers for C or Java.

Short answer: Delphi uses Pascal, other compilers are C or C++.
Because it is easy to implement in a recursive-descent parser, Pascal
is much faster to compile. Note that it also has no preprocessor, and
therefore no #includes.

Ever since their first introduction of Turbo Pascal 1.0, for CP/M
machines, Borland has been noted for writing blindingly fast Pascal
compilers. That first version was orders of magnitude faster than any
other CP/M Pascal. The others were basically ports from minicomputer
systems, and one could easily go for lunch while waiting for a
compilation. Turbo compiled small programs before you could get your
finger off the "C" key.

Since then, Borland has managed to speed up each successive release by
at least a factor of two, if not moreso. One has to feel that there
must be a knee in the curve somewhere, where more speed is hard to
come by, but they don't seem to know that. Last I heard, Delphi I was
supposed to compile at 300,000 lpm. I'm sure v4.0 goes even faster.

Remember that there are at least three parts to what we normally call
compiling. I'm not talking front end/back end, or scan vs. parse.
I'm talking about: (1) turning the source code into object code, (2)
linking object files, and (3) including library files.

Aside from having a fast compiler for part (1), Borland has always
excelled in (2) and (3), as well. Their first compiler made it easy,
by not allowing separate compilation, and including the entire library
in every program. Since then, they've gotten much more sophisticated.
The combination includes Object Pascal Units, which can be
precompiled, and yet selectively linked. By that I mean, if you only
call one procedure from a unit, that's all that gets linked. Second
is their secret weapon, a linker that works very differently from
Microsoft's, and links at the speed of light.

[It's not all that hard to write a fast C compiler. Turbo C was very
fast, much faster than Wizard C from which it was adapted. -John]

Post a followup to this message

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