comp.lang.ada
 help / color / mirror / Atom feed
From: jeffrey.m.creem@lmco.com (Jeff Creem)
Subject: Re: 'others' - inefficient esp. DEC Ada? [1/1]
Date: 1997/10/14
Date: 1997-10-14T00:00:00+00:00	[thread overview]
Message-ID: <jeffrey.m.creem-1410971240120001@ljd155.sanders.lmco.com> (raw)
In-Reply-To: +3g7rFB7dIQ0EwNI@RK-COMP.DEMON.CO.UK


In article <+3g7rFB7dIQ0EwNI@RK-COMP.DEMON.CO.UK>, Rob Kirkbride
<rob@rk-comp.demon.co.uk> wrote:

>
>This is because using the 'others' the array is built up in another part
>of memory before being copied back to My_Array, apparently because
>Null_Element could be a function and it may raise a constraint error.
>
>Apart from the performance this also costs in memory as if this is done
>in a task, the stack size of the task could have to be doubled to cope.
>In one task this causes us to add 3Mb to the task size!
>

Note that most comopilers I have seen do the same thing with any
sort of aggregate assignment (that is a copy is built on the stack and
then the structure is copied back to the final destination).

This has lead to us not using aggregate assignment as much as I would 
like since we often can't take the hit in either stack size or processing time.

There will be some who say that this matters less as processors get faster
(people have been saying that since ...forever) but I can tell you that this
will continue to cause aggregate to be used less than I'd like for a very
long time.

Jeff




  parent reply	other threads:[~1997-10-14  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-12  0:00 'others' - inefficient esp. DEC Ada? [1/1] Rob Kirkbride
1997-10-13  0:00 ` Tom Moran
1997-10-12  0:00   ` Michael & Amy Hartsough
1997-10-13  0:00   ` Rob Kirkbride
1997-10-14  0:00 ` Jeff Creem [this message]
1997-10-15  0:00 ` Matthew Heaney
replies disabled

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