From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: Representation clauses and records
Date: 1997/12/18
Date: 1997-12-18T00:00:00+00:00 [thread overview]
Message-ID: <ELEs0C.7JK.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: u90tiqsmz.fsf@davidf-nt.mks.com
David J. Fiander (davidf@mks.com) wrote:
: Pascal MALAISE <malaise@alphalink.com.au> writes:
: > As far as I know, this problem would not happen in full ADA because the
: > instanciation of unchecked_conversion will be compiled as a call to
: > something
: > like memcpy, a procedure which does not make any assumption about
: > alignment of arguments.
: > We loose performance but gain reliability.
: I've seen other comments that indicate that the runtime cost of a
: call to Unchecked_Conversion is going to be a function call of
: some sort, and I have just one question: "Why?"
I have never seen an implementation that imposes function call
overhead for unchecked-conversion. This sounds like an
"urban myth" ;-). Unchecked conversion does involve making a copy,
but not a function call.
: It would seem to me that if I have an object of some sort, and I
: call Unchecked_Conversion on it, if the type is small enough
: (in C terms converting a pointer to an int), why shouldn't the
: compiler just generate a "load ptr/store int" instruction
: sequence? Now, for larger objects, the compiler will have to
: perform a block move to effect the conversion, either via a
: runtime library call or by open-coding the block move, but that
: depends entirely on the H/W support for block moves.
Right. Whether block moves/copies involve out-of-line code is
independent of the use of unchecked-conversion.
: - David
--
-Tucker Taft stt@inmet.com http://www.inmet.com/~stt/
Intermetrics, Inc. Burlington, MA USA
next prev parent reply other threads:[~1997-12-18 0:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <347000b1.4909762@news.geccs.gecm.com>
1997-11-21 0:00 ` Representation clauses and records Brian Nettleton
1997-11-21 0:00 ` Matthew Heaney
1997-11-21 0:00 ` Brian Nettleton
1997-11-24 0:00 ` Martin M Dowie
1997-11-25 0:00 ` Robert Dewar
1997-11-27 0:00 ` Martin M Dowie
[not found] ` <347a8dc3.3438484@news.geccs.gecm.com>
1997-11-25 0:00 ` Matthew Heaney
1997-12-16 0:00 ` Pascal MALAISE
1997-12-16 0:00 ` Larry Kilgallen
1997-12-17 0:00 ` Pascal MALAISE
1997-12-18 0:00 ` David J. Fiander
1997-12-18 0:00 ` Tucker Taft [this message]
1997-12-18 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox