From: Pascal Obry <pascal@obry.net>
To: mailbox@dmitry-kazakov.de
Subject: Re: Reserve_Capacity for Unbounded_String?
Date: Thu, 26 Jul 2007 10:20:49 +0200
Date: 2007-07-26T10:21:04+02:00 [thread overview]
Message-ID: <46A85961.4020603@obry.net> (raw)
In-Reply-To: <10fo5wx5wokvq$.1e0lhbpujtpma$.dlg@40tude.net>
Dmitry A. Kazakov a �crit :
> Perhaps, one could introduce something like that for Unbounded_String:
>
> X : Unbounded_String := ...;
> for X'Initial_Size use 1024*8; -- 1K at least
> for X'Increment_Factor use 1.5; -- Multiply by 1.5 upon expanding
I really don't see the need for rep attributes here as Unbounded_String
is not intrinsic. So
Initial_Size (X, 1024*8);
Increment_Factor (X, 1.5);
looks more appropriate in this case.
And mind Randy I do not expect to have to use such artifices in my code.
I do expect a compiler to deliver the "expected" best implementation for
every supported features. I'm not in the embedded domain and frankly all
those low-level details are distractions, I prefer to concentrate on my
application and not fighting the compiler :)
The main point for Ada to me is the high level abstraction.
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
next prev parent reply other threads:[~2007-07-26 8:20 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
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 [this message]
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