comp.lang.ada
 help / color / mirror / Atom feed
* A note on GNAT 3.05 performance
@ 1996-06-20  0:00 Robert Dewar
  1996-06-21  0:00 ` Michael F Brenner
  1996-06-24  0:00 ` Dale Pontius
  0 siblings, 2 replies; 11+ messages in thread
From: Robert Dewar @ 1996-06-20  0:00 UTC (permalink / raw)



We have discovered a very significant performance issue in GNAT 3.05. It is
not exactly a bug, but it is certainly a very undesirable inefficiency.

Up to now, we have always arranged that the default calling sequence for
Ada should be the same as C. 

We discovered that there was one respect in which we did not follow this
rule in GNAT 3.04, namely we did not pass records in a manner consistent
with C. In C if you pass a record, a copy is always made, so that the
caller can mess with the record without changing the value in the caller.

So, we "fixed" this "bug".

The trouble is that the result is that all records get copied on calls
to all Ada subprograms. This has pretty significant efficiency consequences.
For example, all unbounded and bounded strings are records. 

Although the result is closer to our pure concept of making C and Ada
calling sequences the same, this clearly will not do. The reason that it
does not affect C much is that it is very unusual in C to pass records,
and it is especially unusual to pass large ones (instead pointers are
almost always passed).

So we will have to back this change out and figure out exactly the best
approach. We will plan to issue a 3.06 version fixing this problem early
next week. 

Sorry for the inconvenience. Note again that this is only a performance
issue, so if you don't have significant performance requirements, or don't
pass records around much, then it won't make a difference, but clearly
enough users are affected that it is worth issuing a new release.

This is one kind of bug that our test suites don't catch -- indeed we
*do* have a test whose fix depends on this undesirable change (it was
made in response to an error report!)

Anyway, I thought I would post this right away, so that perhaps you
might delay picking up 3.05 if you don't urgently need it and wait
the extra few days for 3.06.

Robert Dewar
ACT





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~1996-06-28  0:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-06-20  0:00 A note on GNAT 3.05 performance Robert Dewar
1996-06-21  0:00 ` Michael F Brenner
1996-06-22  0:00   ` Jerry van Dijk
1996-06-24  0:00     ` Robert Dewar
1996-06-28  0:00       ` progers
1996-06-28  0:00       ` Robert A Duff
1996-06-22  0:00   ` Robert Dewar
1996-06-24  0:00 ` Dale Pontius
1996-06-24  0:00   ` Robert Dewar
1996-06-24  0:00   ` Norman H. Cohen
1996-06-24  0:00     ` Robert Dewar

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