comp.lang.ada
 help / color / mirror / Atom feed
From: seas.gwu.edu!mfeldman@uunet.uu.net  (Michael Feldman)
Subject: Re: Query about monitor (passive) task optimization
Date: 2 Aug 93 18:17:50 GMT	[thread overview]
Message-ID: <1993Aug2.181750.19343@seas.gwu.edu> (raw)

In article <CB4z6w.863@ddciiny.UUCP> jls@ddciiny.UUCP (Jonathan Schilling) writ
es:

[stuff deleted]
>
>These are valid points, but they extend to virtually every language feature
>in Ada, not just synchronization tasks.  For instance, changing one of the
>bounds of an array type declaration from a static to a dynamic value could 
>well result in *much* more code being generated for object declarations and
>operations of that type.  Yet most compilers that I know of will not issue 
>a warning when this happens, nor have a pragma to explicitly "control" it.

Once your customers read this, you may indeed get a bunch of requests to
implement it. After all, it's another way to second-guess the compiler. :-)
>
>The essence of compiler optimization in Ada is recognizing simple instances
>of potentially complex constructs, and generating only the code appropriate
>for the simple case.  This goes on all the time in Ada, with array types,
>record types, discriminants, slices, type conversions, tasks, representation
>clauses, and so on.  While compiler user documentation may attempt to outline
>what construct usages the compiler will see as "simple", the coverage is
>rarely complete.  Users often stumble across minor source changes that
>produce significant differences in object efficiency, for reasons that are
>understandable to the compiler writers but less so to anyone else.

And this will ALWAYS be true of high-level languages and optimization.
If you've gotta control every bit, write it in assembler. If you're
writing it in a HLL, these things will bite you now and then. Yep.
That's life.
>
>Unless someone wants to change Ada, or create another real-time language,
>such that the language specification itself imposes execution-time
>efficiency requirements on every construct in the language (has anyone 
>ever tried this?), I'm not convinced of the usefulness of giving special
>treatment to the monitor task optimization.

Exactly!

Mike Feldman

             reply	other threads:[~1993-08-02 18:17 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-08-02 18:17 Michael Feldman [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-08-13  7:32 Query about monitor (passive) task optimization agate!howland.reston.ans.net!darwin.sura.net!sgiblab!munnari.oz.au!goanna
1993-08-11  2:34 agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!u
1993-08-10 23:49 Michael Feldman
1993-08-10 23:14 Michael Feldman
1993-08-10 13:51 Robert Dewar
1993-08-10 13:44 Robert Dewar
1993-08-10  1:47 cis.ohio-state.edu!math.ohio-state.edu!darwin.sura.net!seas.gwu.edu!mfeld
1993-08-10  1:38 cis.ohio-state.edu!math.ohio-state.edu!darwin.sura.net!seas.gwu.edu!mfeld
1993-08-09 21:15 Robert I. Eachus
1993-08-09 14:48 Jonathan Schilling
1993-08-09 12:14 Robert Dewar
1993-08-09 11:02 Richard Kenner
1993-08-09  4:57 Robert Dewar
1993-08-09  4:47 Robert Dewar
1993-08-09  4:41 Robert Dewar
1993-08-03 20:10 Michael Feldman
1993-08-03 20:01 Michael Feldman
1993-08-03 15:26 Jonathan Schilling
1993-08-03 10:11 Bjorn Kallberg
1993-08-02 18:13 Michael Feldman
1993-08-02 17:47 Michael Feldman
1993-08-02 14:35 Jonathan Schilling
1993-08-02 13:19  Arthur Evans
1993-08-02  6:41 Bjorn Kallberg
1993-08-02  3:30 Michael Feldman
1993-08-02  1:57 Jonathan Schilling
1993-08-01  3:25 Michael Feldman
1993-07-31  3:27 Robert Dewar
1993-07-30 17:51 Michael Feldman
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox