Related articles |
---|
[9 earlier articles] |
Re: Loop Optimizations and Gotos plong@perf.com (Paul Long) (1995-11-21) |
Re: Loop Optimizations and Gotos preston@tera.com (1995-11-21) |
Re: Loop Optimizations and Gotos cliffc@ami.sps.mot.com (1995-11-21) |
Re: Loop Optimizations and Gotos cliffc@ami.sps.mot.com (1995-11-22) |
Re: Loop Optimizations and Gotos Paul_Long@ortel.org (1995-11-23) |
Re: Loop Optimizations and Gotos bill@amber.ssd.hcsc.com (1995-11-27) |
Re: Loop Optimizations and Gotos dave@occl-cam.demon.co.uk (Dave Lloyd) (1995-11-27) |
Re: Loop Optimizations and Gotos hrubin@stat.purdue.edu (1995-11-29) |
Newsgroups: | comp.compilers |
From: | Dave Lloyd <dave@occl-cam.demon.co.uk> |
Keywords: | optimize |
Organization: | Compilers Central |
References: | 95-11-076 95-11-182 |
Date: | Mon, 27 Nov 1995 15:22:43 GMT |
> > Dave Lloyd <dave@occl-cam.demon.co.uk> 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.
[cut]
> 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.
Regards,
----------------------------------------------------------------------
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
comp.compilers page.
Search the
comp.compilers archives again.