From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4e04f7888d82ca71 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: Efficiency of returning big objects Date: Tue, 26 Sep 2006 09:45:21 +0200 Message-ID: <4ns43qFbqlnqU2@individual.net> References: <4npvh0FbgbuhU1@individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: individual.net Rog6UOtD1Cy19QZOKrRQHwwNEM1E84h6Z2iC4aq8JjljjcnGg= User-Agent: KNode/0.10.4 Xref: g2news2.google.com comp.lang.ada:6746 Date: 2006-09-26T09:45:21+02:00 List-Id: Jeffrey R. Carter wrote: > Alex R. Mosteo wrote: >> So, what do you think? Is there some error in my reasoning or testbed? > > I think so. The real questions should be, what are the timing (or > storage; it's not clear if you're discussing time or space efficiency) I'm more worried about time efficiency when copying large objects, as long as the objects aren't that large to risk stack overflows. In any case, here time efficiency is a side effect of less extra copies. > requirements for this application? Does the clearest implementation > (returning an object) meet those requirements? If not, is complicating > the code to return aliases the only way to meet them? If not, does one > of the other ways have less of an effect on clarity? At least now I'm more informed to make these tradeoffs, instead of relying in some compiler magic that isn't happening...