comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Reserve_Capacity for Unbounded_String?
Date: Wed, 25 Jul 2007 13:58:19 -0500
Date: 2007-07-25T13:58:19-05:00	[thread overview]
Message-ID: <f886bv$fu2$1@jacob-sparre.dk> (raw)
In-Reply-To: 46A70064.8090407@obry.net

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1202 bytes --]

"Pascal Obry" <pascal@obry.net> wrote in message
news:46A70064.8090407@obry.net...
> Randy Brukardt a �crit :
> > And now I've wasted far too much time on this worthless topic.
>
> If you think so! GNAT has implemented that as in a real application the
> code was running more than 10 times faster.

I don't think that much of a speed-up would be possible with Janus/Ada even
with a specially tuned version of Ada.Strings.Unbounded. The overhead of
allocation is only a portion of the total overhead, after all; call
overhead, checking overhead, and copying overhead are all significant. The
only way to get close would be to preallocate strings in large blocks, but
that would only make sense for applications with very few unbounded strings
and that do a lot of appends and '&'s. The performance would be worse on
programs that use tens of thousands of Unbounded_Strings (like my spam
filter and most other real apps that I've seen) because of increased paging
overhead and reduced capacity.

> If you think you have wasted
> far too much time, no problem. I'm not a Janus/Ada customer anyway!

Exactly. My response would be different to a good customer...

                             Randy.





  parent reply	other threads:[~2007-07-25 18:58 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-22 19:54 Reserve_Capacity for Unbounded_String? Maciej Sobczak
2007-07-22 21:32 ` Robert A Duff
2007-07-23 19:29   ` Maciej Sobczak
2007-07-23 20:30     ` Robert A Duff
2007-07-23  4:28 ` Jeffrey R. Carter
2007-07-23 15:07 ` Adam Beneschan
2007-07-24  1:01   ` Randy Brukardt
2007-07-24  7:57     ` Pascal Obry
2007-07-24 18:58       ` Randy Brukardt
2007-07-24 23:50         ` Robert A Duff
2007-07-25  0:00           ` Randy Brukardt
2007-07-24 23:54         ` Pascal Obry
2007-07-25  0:52           ` Randy Brukardt
2007-07-25  1:28           ` Randy Brukardt
2007-07-25  7:48             ` Pascal Obry
2007-07-25  9:55               ` Georg Bauhaus
2007-07-25 10:02                 ` Georg Bauhaus
2007-07-25 18:58               ` Randy Brukardt [this message]
2007-07-25  8:50             ` Martin Krischik
2007-07-25  9:26               ` AW: " Grein, Christoph (Fa. ESG)
2007-07-25 15:32                 ` Martin Krischik
2007-07-25 15:39                 ` Martin Krischik
2007-07-24 23:41     ` Robert A Duff
2007-07-25  0:16       ` Randy Brukardt
2007-07-25  2:25         ` Robert A Duff
2007-07-25  6:07           ` Simon Wright
2007-07-25 19:08           ` Randy Brukardt
2007-07-25 20:37             ` Maciej Sobczak
2007-07-25 22:06               ` Georg Bauhaus
2007-07-26  6:24                 ` Maciej Sobczak
2007-07-26  8:09                   ` Dmitry A. Kazakov
2007-07-26  8:20                     ` Pascal Obry
2007-07-26  9:59                       ` Dmitry A. Kazakov
2007-07-26  8:35                   ` Georg Bauhaus
2007-07-26 22:11               ` Randy Brukardt
replies disabled

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