comp.lang.ada
 help / color / mirror / Atom feed
From: "Tarjei T. Jensen" <tarjei@online.no>
Subject: Re: GNAT: Performance of String functions
Date: 1997/07/20
Date: 1997-07-20T00:00:00+00:00	[thread overview]
Message-ID: <33D1D2BB.2023@online.no> (raw)
In-Reply-To: dewar.869371653@merv


Robert Dewar wrote:
> 
> Tarjei said
> 
> <<VAX Pascal passes strings by descriptors. The string pointed to by
> descriptor is of type counted string. A counted string has a maximum
> size, an actual size and the string itself. I'm not sure anymore if the
> descriptor contains the maximum size of the string or if the programmer
> have to keep track of this.
> 
> This means that comparing Ada bounded strings and VAX Pascal strings
> compares two different ways of doing things. Each time you change the
> size of an Ada bounded string there can be serious overhead.
> >>
> 
> So, clearly Vax Pascal strings are to be compared with bounded strings,
> not with unbounded strings, and presumably there is no automatic
> finalization involved.
> 
> I am not sure what your "serious" overhead message is about, makes no
> sense to me, but perhaps it is just not clear.

I wrote bounded string when I meant unbounded string. Silly me.

As unbounded strings are allocated on the heap there is a potential
serious overhead in allocating and deallocating space for these strings
as they change size. The serious overhead can include system calls to
allocate or free space. I expect that it also include wholesale copying
of the contents of the strings.

I have not checked the GNAT source for how unbounded strings are
handled.

Greetings,


-- 
// Tarjei T. Jensen 
//    tarjei@online.no || voice +47 51 62 85 58
//   Support you local rescue centre: GET LOST!




  reply	other threads:[~1997-07-20  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 [this message]
1997-07-20  0:00         ` Robert Dewar
1997-07-21  0:00           ` Tucker Taft
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                             ` 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-21  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