comp.lang.ada
 help / color / mirror / Atom feed
From: kilgallen@eisner.decus.org (Larry Kilgallen)
Subject: Re: Efficient io of arbitrary binary data.
Date: 1996/09/14
Date: 1996-09-14T00:00:00+00:00	[thread overview]
Message-ID: <1996Sep14.153426.1@eisner> (raw)
In-Reply-To: 3239B3B2.1AE4@cray.com


In article <3239B3B2.1AE4@cray.com>, "Brian R. Hanson" <brh@cray.com> writes:

> I a puzzled.  The approaches which Ada seems to allow all require 
> much more copying of data as I am not allowed to return a reference
> to a slice of an array I can only return the slice itself.

Presuming the concern is runtime efficiency rather than code inspection
efficiency :-), whether you return a slice or a reference to a slice
may be immaterial. A compiler with aggressive optimization may generate
inline code for your whole "read" function, making the object code
for the two methods equivalent.  When programming in Ada you have
given the compiler more information than programming in C, so it has
more opportunity to optimize.  Based on your return address, I would
presume folks in your shop are big on optimizing compilers.

Larry Kilgallen




  reply	other threads:[~1996-09-14  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-13  0:00 Efficient io of arbitrary binary data Brian R. Hanson
1996-09-14  0:00 ` Larry Kilgallen [this message]
1996-09-16  0:00   ` Brian Hanson
1996-09-16  0:00     ` Robert A Duff
1996-09-16  0:00     ` Larry Kilgallen
1996-09-16  0:00     ` Stephen Leake
1996-09-14  0:00 ` Larry Kilgallen
1996-09-14  0:00   ` Robert Dewar
1996-09-16  0:00   ` Brian Hanson
1996-09-17  0:00   ` Ted Dennison
replies disabled

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