|Re: Ada vs. C performance firstname.lastname@example.org (Arch Robison) (1997-01-12)|
|Re: Ada vs. C performance email@example.com (David L Moore) (1997-01-14)|
|Re: Ada vs. C performance firstname.lastname@example.org (1997-01-16)|
|Re: Ada vs. C performance email@example.com (David L Moore) (1997-01-19)|
|From:||David L Moore <firstname.lastname@example.org>|
|Date:||19 Jan 1997 21:46:08 -0500|
|References:||97-01-084 97-01-104 97-01-130|
Robert A Duff wrote:
> David L Moore <email@example.com> wrote:
> >Ada requires that exceptions occur more or less in place (the detailed
> >requirements can be found in the standard). This can limit code motion.
> This is not true. Section 11.6 of the Ada Reference Manual allows a
> great deal of freedom for the compiler to move exception-raising around.
The new standard is certainly less restrictive than the old in this
regard. I have just re-read 11.6 it and it is in fact less
restrictive than I remembered, but the language does still lay down
rules on what may be done.
In the old standard, moving a possible exception out of the range of
its associated handler was not permitted. If I understand it
correctly, the new standard does permit some such motions, but by no
I suspect that proving that a proposed motion is standard conforming
will be quite difficult in many cases, so I would expect all but the
best optimizing compilers to back off from potentially conformance
breaking code motion rather than do the analysis. This is may not be a
bad solution since some safety-critical users are wary of agressive
optimization even if it is standard conforming.
As 11.6 makes quite clear, the intent is to provide a compromise
between performance and predictability. Because the standard specifies
what can be done, the compiler writer has to carefully consider the
effect of all optimizations on conformance.
The benefit for the user of such care is great, and is not provided by
any other wide-spread language, but it makes an Ada optimizer
significantly more expensive to produce than an optimizer for other
Here is a link to the text of the section of the standard in question:
Return to the
Search the comp.compilers archives again.