From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4da4573d129f824a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-09 10:23:16 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed.stueberl.de!proxad.net!freenix!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: "amado.alves" Newsgroups: comp.lang.ada Subject: RE: style Q: type .. is new String; Date: Fri, 9 Jan 2004 18:17:43 -0000 Organization: Cuivre, Argent, Or Message-ID: NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: melchior.cuivre.fr.eu.org 1073672281 13970 80.67.180.195 (9 Jan 2004 18:18:01 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Fri, 9 Jan 2004 18:18:01 +0000 (UTC) To: Return-Path: X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: style Q: type .. is new String; Thread-Index: AcPW1tBS8JvQXqdbTQOZcQjwUtL7vAAAscl4 X-OriginalArrivalTime: 09 Jan 2004 18:17:43.0303 (UTC) FILETIME=[DFD67970:01C3D6DC] X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.3 Precedence: list List-Id: Gateway to the comp.lang.ada Usenet newsgroup List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:4265 Date: 2004-01-09T18:17:43+00:00 >>Me too. And I also use Unbounded_String a lot because it has the = wonderful >>feature of memory magic (no memory associated with a US object is lost = upon >>assignment or scope exit). (Shameless publicity: I'll expound this = memory >>magic approach to container design in Ada-Europe 2004 in the half day >>tutorial "No Pointers, Great Programs". See you there ;-) >What about performance? I've always been worried about the time lost >allocating/deallocating memory all over the place. You still have that penalty when you do the memory management = explicitly. A decently implemented unbounded container, if properly = used, will not penalize you significantly more, if at all. Take a look = at Charles.Vectors.Unbounded for example. Now, if your talking hard real time, of course you need containers with = absolutely predictable behaviour w.r.t. to the time their operations = take. To achieve that you often write your own containers. This often = has the unfortunate effect that the container and the application logics = get intertwined. So a container library with real time features would be = nice. Fortunately Charles-for-ARG (AI-302/2) has some time complexity = features that I believe satisfy at least *soft* real time demands. Every now and then I do experimental measures of direct vs. indirect = memory managent (e.g. String vs. Unbounded_String) in real applications, = and mostly I find that the time taken by memory allocation/deallocation = is not significant. That is not surprising if you think that because = memory allocation/deallocation is such a basic thing in the execution of = programs the system mechanisms to achieve must be very optimized (and = they indeed are if you look at them directly although I haven't done = that in a long time).