comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: GNAT: Performance of String functions
Date: 1997/07/22
Date: 1997-07-22T00:00:00+00:00	[thread overview]
Message-ID: <dewar.869607817@merv> (raw)
In-Reply-To: 5r1l6e$e0h$1@ratatosk.uio.no


iTarjei said

<<A counted string would be equivalent to a bounded string with individual
maximum string length. All would be assignment compatible if the length of
the assigned string was equal or less to the maximum size of the destinatation.

I suspect bounded strings will perform badly against a counted string
implementation because assignment of strings involves copying the entire array
whether it contains valid data or not. This makes Ada less than wonderful in
applications that involve a lot of bounded string assignments.
>>

There is no reason that the implementation has to copy the entire string,
it may, but that is an implementation issue, not a language issue. In fact
what makes you think you know *anything* about the implementation of
bounded string from the RM, it is a private type.

You can make the above comment for some particular implementation of 
Ada, but your statement above, which phrases it as a comment on the
language is just plain incorrect.

You may be right that if there are aplications that involve a lot of
bounded string assignments (I have not seen any yet), and if the implementation
does full copies all the time, THEN for that implementation, there may
be a problemantic inefficiency.

Actually it makes perfectly sense to implement bounded strings in terms
of what you call counted strings. That's certainly the implementation
plan for GNAT. A side benefit of this approach is that then far less
of the implementation is generic.





  parent reply	other threads:[~1997-07-22  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                   ` 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                             ` Robert Dewar
1997-07-28  0:00                               ` Mats Weber
1997-07-28  0:00                                 ` Matthew Heaney
1997-07-29  0:00                                   ` Robert Dewar
1997-07-28  0:00                                 ` Robert Dewar
1997-07-28  0:00                                   ` Robert Dewar
1997-07-24  0:00                             ` Tarjei Jensen
1997-07-24  0:00                               ` Matthew Heaney
1997-07-24  0:00                               ` Robert Dewar
1997-07-24  0:00                             ` Matthew Heaney
1997-07-22  0:00                   ` Robert Dewar [this message]
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