From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: GNAT: Performance of String functions
Date: 1997/07/24
Date: 1997-07-24T00:00:00+00:00 [thread overview]
Message-ID: <dewar.869780561@merv> (raw)
In-Reply-To: 5r7n83$b37$1@ratatosk.uio.no
Tarjei says
<<> Mats Weber <Mats.Weber@elca-matrix.ch> writes:
>
> subtype Length_Range is Natural range 0 .. Max_Length;
>
> type Bounded_String (Length : Length_Range := 0) is record
> Data : String (1 .. Length);
> end record;
>
As father Jones informes his son: Our situation has not improved.
The alternative bounded string is just an unbounded string. That means that
there is a potential copy of the string each time the size changes. This may
be worse than the original GNAT version of bounded string wich only performs
the copy on assignment.
I don't think the real time people would be happy with the above solution. I
don't think they like to think of what it might do to the heap. I'm not
particulary happy with the solution either.
>>
I agree that this is a dubious choice. The trouble is that with this
representation you CANNOT change the length of an existing value, you
can ONLY assign to change the length. With this representation, I would
be stronger than Tarjei and say "there is a copy" not "there is a potential
copy", since it is really hard to imagine a compiler that avoids the copy
on the full record assignment needed to change the length.
next prev parent reply other threads:[~1997-07-24 0:00 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-07-18 0:00 GNAT: Performance of String functions Jakob Heinemann
1997-07-18 0:00 ` Robert Dewar
1997-07-19 0:00 ` Tarjei T. Jensen
1997-07-19 0:00 ` Matthew Heaney
1997-07-20 0:00 ` Tarjei T. Jensen
1997-07-20 0:00 ` Robert Dewar
1997-07-20 0:00 ` Tarjei T. Jensen
1997-07-20 0:00 ` Robert Dewar
1997-07-21 0:00 ` Tucker Taft
1997-07-21 0:00 ` Robert Dewar
1997-07-21 0:00 ` Tarjei Jensen
1997-07-21 0:00 ` Matthew Heaney
1997-07-22 0:00 ` Robert Dewar
1997-07-22 0:00 ` Tarjei Jensen
1997-07-22 0:00 ` Robert Dewar
1997-07-22 0:00 ` Larry Kilgallen
1997-07-22 0:00 ` Tarjei T. Jensen
1997-07-23 0:00 ` Larry Kilgallen
1997-07-23 0:00 ` Robert Dewar
1997-07-23 0:00 ` Tarjei Jensen
1997-07-23 0:00 ` Samuel Mize
1997-07-23 0:00 ` W. Wesley Groleau x4923
1997-07-24 0:00 ` Robert A Duff
1997-07-24 0:00 ` Mats Weber
1997-07-24 0:00 ` Matthew Heaney
1997-07-24 0:00 ` Tarjei Jensen
1997-07-24 0:00 ` Matthew Heaney
1997-07-24 0:00 ` Robert Dewar [this message]
1997-07-24 0:00 ` Robert Dewar
1997-07-28 0:00 ` Mats Weber
1997-07-28 0:00 ` Robert Dewar
1997-07-28 0:00 ` Robert Dewar
1997-07-28 0:00 ` Matthew Heaney
1997-07-29 0:00 ` Robert Dewar
1997-07-22 0:00 ` Jakob Heinemann
1997-07-23 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox