Re: Crenshaw's Tutorial

"Randall Hyde" <rhyde@shoe-size.com>
15 Feb 2000 22:14:05 -0500

          From comp.compilers

Related articles
Crenshaw's Tutorial colin@bentanimation.com (Colin Doncaster) (2000-01-19)
Re: Crenshaw's Tutorial rkrayhawk@aol.com (2000-01-21)
Re: Crenshaw's Tutorial jcrens@earthlink.net (Jack Crenshaw) (2000-02-05)
Re: Crenshaw's Tutorial joachim.durchholz@halstenbach.com.or.de (Joachim Durchholz) (2000-02-10)
Re: Crenshaw's Tutorial gneuner@dyn.com (2000-02-12)
Re: Crenshaw's Tutorial alanf@ns.net (Alan Fargusson) (2000-02-15)
Re: Crenshaw's Tutorial rhyde@shoe-size.com (Randall Hyde) (2000-02-15)
Re: Crenshaw's Tutorial joachim.durchholz@halstenbach.com.or.de (Joachim Durchholz) (2000-02-17)
Re: Crenshaw's Tutorial david.thompson1@worldnet.att.net (David Thompson) (2000-02-21)
Re: Crenshaw's Tutorial christian.bau@isltd.insignia.com (2000-03-23)
| List of all articles for this month |
From: "Randall Hyde" <rhyde@shoe-size.com>
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.