comp.lang.ada
 help / color / mirror / Atom feed
From: Kilgallen@SpamCop.net (Larry Kilgallen)
Subject: Re: Where are returned values stored?
Date: 7 Jun 2004 07:09:57 -0600
Date: 2004-06-07T07:09:57-06:00	[thread overview]
Message-ID: <tjsXkypBlsee@eisner.encompasserve.org> (raw)
In-Reply-To: fpadncjkKI4MV17dRVn-uQ@comcast.com

In article <fpadncjkKI4MV17dRVn-uQ@comcast.com>, "Robert I. Eachus" <rieachus@comcast.net> writes:

> This is a "meta-point" that needs to be made again and again.  Ada 
> compilers use many 'solutions' that assume that "under normal 
> circumstances" performance will be fine.  Normal circumstances for Ada 
> includes decent software engineering practice.  There are lots of 
> 'newbie' questions, like this one, where the answer has to reference 
> software engineering practice to describe WHY things are done the way 
> they are done.
> 
> In this case, the assumption is that in Ada, functions do not normally 
> return 'large' objects, but that large is defined in terms of 
> performance in the execution environment, not some arbitrary limit.  So 
> if a program uses some function that returns a multi-megabyte String, in 
> some execution environments this will be a problem.  But if Integer is a 
> 32-bit type, the language will allow you to try to return a 2 Gigabyte 
> String.  On most hardware, you will fail, but if you are running your 
> program on a 64-bit system with more 4 Gigs of memory, performance won't 
> be bad at all.

Merely having hardware capable of 64-bit addressing does not speed the
copying of that 2 Gigabyte string, so performance might be awful.  On
the other hand, there is a greater likelyhood the program will run to
completion, which is a correctness issue.



  reply	other threads:[~2004-06-07 13:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-26 19:46 Where are returned values stored? (follow up to yesterday's question) James Alan Farrell
2004-05-26 20:44 ` Simon Wright
2004-05-27  7:51   ` Dmitry A. Kazakov
2004-05-27  9:39 ` Where are returned values stored? Marius Amado Alves
2004-05-27 17:05   ` Warren W. Gay VE3WWG
2004-05-27 20:24     ` James Alan Farrell
2004-05-28 20:33       ` Warren W. Gay VE3WWG
2004-05-29  7:03         ` Martin Krischik
2004-05-29 13:19           ` Larry Kilgallen
2004-05-30  7:10             ` Martin Krischik
2004-06-02  3:14         ` Robert I. Eachus
2004-05-30 21:17     ` Nick Roberts
2004-05-31 12:58       ` Warren W. Gay VE3WWG
2004-06-02  4:07         ` Robert I. Eachus
2004-06-02 12:42           ` Warren W. Gay VE3WWG
2004-06-03  2:00             ` Nick Roberts
2004-06-03  4:34             ` Robert I. Eachus
2004-06-03 16:06               ` Warren W. Gay VE3WWG
2004-06-03 16:13               ` Nick Roberts
2004-06-07  1:53                 ` Robert I. Eachus
2004-06-07 13:09                   ` Larry Kilgallen [this message]
2004-06-09  7:03                     ` Robert I. Eachus
2004-06-05 17:13             ` Simon Wright
2004-05-27 17:11   ` Martin Krischik
2004-05-27 17:07 ` Where are returned values stored? (follow up to yesterday's question) Martin Krischik
replies disabled

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