From: "Alex R. Mosteo" <devnull@mailinator.com>
Subject: Re: Amount of copying on returned constant objects
Date: Mon, 18 Jun 2007 20:14:15 +0300
Date: 2007-06-18T20:14:15+03:00 [thread overview]
Message-ID: <5dnsr8F35f25mU1@mid.individual.net> (raw)
In-Reply-To: 15bf7x8niwgcz.horig9zyjn4p.dlg@40tude.net
Dmitry A. Kazakov wrote:
> On Fri, 15 Jun 2007 19:19:00 +0300, Alex R. Mosteo wrote:
>> a) is there something in the ARM that prevents an equivalent transparent
>> optimization in the Ada side (returning the reference when it is detected
>> that the returned object is not modified)?
>
> No [*], but a way to help the compiler to know what you wanted is:
>
> declare
> Item : Element renames Get (Collection, Key);
> -- Please, don't make new objects, if you can
> begin
> ... -- Use Item
And this gives me another question: is there any guarantee that renaming
will avoid multiple calls, or implementation advice in this direction? I've
tried to quickly find the answer in 8.5.4 but I guess I'm not specially
suited for ARM reading today, since I don't see it clearly.
prev parent reply other threads:[~2007-06-18 17:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-15 16:19 Amount of copying on returned constant objects Alex R. Mosteo
2007-06-15 16:32 ` Ludovic Brenta
2007-06-18 17:26 ` Alex R. Mosteo
2007-06-19 10:22 ` Alex R. Mosteo
2007-06-15 22:03 ` Georg Bauhaus
2007-06-18 17:23 ` Alex R. Mosteo
2007-06-18 17:35 ` Pascal Obry
2007-06-18 18:04 ` Alex R. Mosteo
2007-06-18 20:25 ` Randy Brukardt
2007-06-19 8:26 ` Dmitry A. Kazakov
2007-06-19 10:24 ` Alex R. Mosteo
2007-06-19 21:33 ` Randy Brukardt
2007-06-20 1:31 ` Markus E Leypold
2007-06-20 6:25 ` Georg Bauhaus
2007-06-20 13:00 ` Markus E Leypold
2007-06-20 7:34 ` Dmitry A. Kazakov
2007-06-18 18:34 ` Georg Bauhaus
2007-06-16 6:48 ` Dmitry A. Kazakov
2007-06-18 17:14 ` Alex R. Mosteo [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