Re: Crenshaw's Tutorial

"Randall Hyde" <>
15 Feb 2000 22:14:05 -0500

          From comp.compilers

Related articles
Crenshaw's Tutorial (Colin Doncaster) (2000-01-19)
Re: Crenshaw's Tutorial (2000-01-21)
Re: Crenshaw's Tutorial (Jack Crenshaw) (2000-02-05)
Re: Crenshaw's Tutorial (Joachim Durchholz) (2000-02-10)
Re: Crenshaw's Tutorial (2000-02-12)
Re: Crenshaw's Tutorial (Alan Fargusson) (2000-02-15)
Re: Crenshaw's Tutorial (Randall Hyde) (2000-02-15)
Re: Crenshaw's Tutorial (Joachim Durchholz) (2000-02-17)
Re: Crenshaw's Tutorial (David Thompson) (2000-02-21)
Re: Crenshaw's Tutorial (2000-03-23)
| List of all articles for this month |

From: "Randall Hyde" <>
Newsgroups: comp.compilers
Date: 15 Feb 2000 22:14:05 -0500
Organization: Compilers Central
References: 00-01-073 00-02-017 00-02-038
Keywords: design, performance

> > That is the general philosophy behind all of Wirth's languages, and
> > it is no accident that Pascal compilers generally run twice or more
> > as fast as equivalent C compilers.
> I'd be interested to hear whether that is due to differences in
> parsing speed or to other factors. For example, the Borland compilers
> have traditionally neglected optimization in favor of compilation
> speed.

Pascal (and many other Wirth languages) can compile code in a single
pass. Most *fast* Pascal compilers I'm familiar with generally
compiled directly to executable object code (rather than producing a
relocatable object file that had to be linked). Of course, not having
to include and process a million and one include files with billions
of constants you don't use (to get the one you do use) also has a very
negative impact on C/C++ compilations. Precompiled header files help
a lot, but there is still a lot of processing time wasted on this.
The few Pascals I've used that allow separate compilation *always*
precompiled the "units" and the symbol table info needed by the code
using the unit.

Note that the latest versions of Inprise's Pascal and C/C++ compilers
supposedly use the same back end. Even so, the Delphi/Pascal compiler
is many times faster than the C/C++ compiler. This is true even after
Inprise added many features to Delphi that were stolen directly from
C++ (and affect the ability to compile the code in a single pass).
Randy Hyde

Post a followup to this message

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