From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: A note on GNAT 3.05 performance
Date: 1996/06/24
Date: 1996-06-24T00:00:00+00:00 [thread overview]
Message-ID: <dewar.835632276@schonberg> (raw)
In-Reply-To: 4qm21c$qig@mdnews.btv.ibm.com
Dale said
When I first began looking at Ada, I wondered if if was 'pass by value'
or 'pass by reference'. The answer was, apparently, 'neither and both'.
It seemed to me that Ada was attempting to 'idealize' a concept by
using copy-in/copy-out that it shouldn't be.
Ada was not doing anything new here. Fortran has also always had an
implementation defined choice between pass by reference and pass by
copy for exactly the same reason (efficiency).
Now maintaining copy-in and copy-out will apparently have a performance
penalty, yet changing that aspect to pass-by-reference will not be
consistant with regular 'in' parameter passing.
Regular in parameter passing allows records to be passed by copy or
reference, so there is no inconsistency here. The issue was being
consistent with C by default, there is no problem at the Ada
semantic level.
Are Ada pragmas frozen in concrete the way the rest of the language
is? Is it feasible to make 'pass by copy' and 'pass by reference'
for record parameters adjustable on a pragma basis? Is it desirable?
New pragmas can be added (see the features file in the GNAT distribution
for many interesting ones added to GNAT). We will be implementing all the
Dec pragmas in the near future, which among other things allow this level
of control.
Of course the use of pragma Convention (or Import or Export) will in
practice control the choice of record passing semantics.
prev parent reply other threads:[~1996-06-24 0:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Norman H. Cohen
1996-06-24 0:00 ` Robert Dewar
1996-06-24 0:00 ` Robert Dewar [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox