Re: HLL syntax & structure suited to rapid compilation?

"Marco van de Voort" <marcov@toad.stack.nl>
31 Jul 2002 00:54:57 -0400

          From comp.compilers

Related articles
HLL syntax & structure suited to rapid compilation? gswork@mailcity.com (gswork) (2002-07-24)
Re: HLL syntax & structure suited to rapid compilation? steve@lurking.demon.co.uk (Steve Horne) (2002-07-25)
Re: HLL syntax & structure suited to rapid compilation? marcov@toad.stack.nl (Marco van de Voort) (2002-07-31)
Re: HLL syntax & structure suited to rapid compilation? joachim_d@gmx.de (Joachim Durchholz) (2002-08-04)
Re: HLL syntax & structure suited to rapid compilation? ceco@jupiter.com (Tzvetan Mikov) (2002-08-10)
Re: HLL syntax & structure suited to rapid compilation? marcov@toad.stack.nl (Marco van de Voort) (2002-08-10)
Re: HLL syntax & structure suited to rapid compilation? marcov@toad.stack.nl (Marco van de Voort) (2002-08-14)
Re: HLL syntax & structure suited to rapid compilation? joachim_d@gmx.de (Joachim Durchholz) (2002-08-23)
Re: HLL syntax & structure suited to rapid compilation? ceco@jupiter.com (Tzvetan Mikov) (2002-08-23)
[2 later articles]
| List of all articles for this month |
From: "Marco van de Voort" <marcov@toad.stack.nl>
Newsgroups: comp.compilers
Date: 31 Jul 2002 00:54:57 -0400
Organization: Eindhoven University of Technology, The Netherlands
References: 02-07-098 02-07-121
Keywords: performance
Posted-Date: 31 Jul 2002 00:54:56 EDT

Steve Horne wrote:
> On 24 Jul 2002 02:22:03 -0400, "gswork" <gswork@mailcity.com> wrote:


> More important, perhaps, is how 'explicit' the grammar is. For
> instance, in C and C++ a parser needs to look at run-time generated
> tables of identifiers to disambiguate many rules.


The tendancy that Pascal compilers are faster is afaik mainly _NOT_ parsing
related. True, Pascal parses easily, but the most important reasons why e.g.
TP/BP is so fast, are
- the unit system with precompiled units, and parsed headers and
- the all in one "make" (dependancy resolver), preprocessor,
    compiler, assembler, linker combination.


I think a C system that caches headers, and compiles programs in one run,
without relying too much on externals, could be sped up significantly too.


Take e.g. GCC, if you run "make" to build a program, it invokes:
- Make
- maybe some small shellutils/commands in the makefile
- compiler which invokes
- the preprocessor
- then compiles the sources and pipes the resulting assembler to the assembler.
- (AR to build libraries of part of the system)
- LD to finish linking it.


True, the amount of work required to implement a equivalent compiler for C
is probably higher than for Pascal, (the same goes for the optimizer) but if
the work is done, it shouldn't be that much slower.
[Turbo C started from Wizard C, a competent but not particularly fast
C compiler, added pretty much exactly the performance tweaks suggested
above, and became really fast. -John]



Post a followup to this message

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