|[9 earlier articles]|
|Re: Loop Optimizations and Gotos email@example.com (Paul Long) (1995-11-21)|
|Re: Loop Optimizations and Gotos firstname.lastname@example.org (1995-11-21)|
|Re: Loop Optimizations and Gotos email@example.com (1995-11-21)|
|Re: Loop Optimizations and Gotos firstname.lastname@example.org (1995-11-22)|
|Re: Loop Optimizations and Gotos Paul_Long@ortel.org (1995-11-23)|
|Re: Loop Optimizations and Gotos email@example.com (1995-11-27)|
|Re: Loop Optimizations and Gotos firstname.lastname@example.org (Dave Lloyd) (1995-11-27)|
|Re: Loop Optimizations and Gotos email@example.com (1995-11-29)|
|From:||Dave Lloyd <firstname.lastname@example.org>|
|Date:||Mon, 27 Nov 1995 15:22:43 GMT|
> > Dave Lloyd <email@example.com> wrote:
> > >It's simple - don't use goto. Many compilers have extra levels of
> > >optimisation that only kick in when a control construct can be
> > >clearly recognised that are not feasible in general for gotos.
> As reported by myself and others, this is wrong. Most compilers will
> pick up the loop structure from goto's, and don't care a whit about
> syntatic loops.
> As mentioned above, most optimizing compilers don't give a darned about
> "structured programming".
I'm sorry I really don't agree. My experience over the last few
years with tuning our compiler has been that "structured programming"
optimisations give order of magnitude improvements while low-level
code-generation optimisations give a small constant improvement
(sometimes dramatic but often only a few percent). If it is the case
that that most compilers flatten everything to the scalar operations,
gotos, labels and ignore the structured high level constructs (and
the information they carry), then most compilers are missing out on
significant optimisation and forcing their programmers to specify
every step to get their performance which is against the point of a
high level language. Low-level coding can as easily lead to too much
noise for the compiler's heuristics to see through. Remember that C
has no real structured programming worth talking about - look to C++,
F90, Ada, and Algol 68 for more interest. For F90 what is important
is coalescing elemental array operations, independence analysis on
whole arrays, fast storage allocation and garbage collection, global
analysis for dummy procedures, etc.
Dave Lloyd Email: Dave@occl-cam.demon.co.uk
Oxford and Cambridge Compilers Ltd Phone: (44) 1223 572074
55 Brampton Rd, Cambridge CB1 3HJ, UK
Return to the
Search the comp.compilers archives again.