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=0.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a65bb7bde679ed1d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.15.105 with SMTP id w9mr5658780pbc.7.1322681979947; Wed, 30 Nov 2011 11:39:39 -0800 (PST) Path: lh20ni46247pbb.0!nntp.google.com!news1.google.com!goblin1!goblin.stu.neva.ru!news.tornevall.net!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Ann: Natools.Chunked_Strings, beta 1 Date: Wed, 30 Nov 2011 12:39:36 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: <4ed4fc37$0$2537$ba4acef3@reader.news.orange.fr> NNTP-Posting-Host: da696851035d62f31fdf8400e3139b95 Mime-Version: 1.0 X-Trace: 4c76f60d5a6fb9b4cff3949870355501 X-Complaints-To: abuse@tornevall.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: X-UserIDNumber: 1738 X-Validate-Post: http://news.tornevall.net/validate.php?trace=4c76f60d5a6fb9b4cff3949870355501 X-Complaints-Italiano: Non abbiamo padronanza della lingua italiana - se mandate una email scrivete solo in Inglese, grazie X-Posting-User: 0243687135df8c4b260dd4a9a93c79bd Xref: news1.google.com comp.lang.ada:19270 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: 2011-11-30T12:39:36-07:00 List-Id: On 11/30/2011 06:08 AM, Natasha Kerensikova wrote: > > [An implementation optimized for appending should have better performance for > that use and GNAT's Unbounded_String uses a contiguous array] Combined with > the fact I use GNAT is enough (for me) to justify writing > Natools.Chunked_Strings. Justifications for rewriting Unbounded_Strings are 1. For fun 2. As a learning experience 3. You have timing requirements you can't otherwise meet. 3. does not appear to be the case here; you're planning to write something, but you have yet to demonstrate that Unbounded_Strings isn't suitable for its timing requirements. So you're doing it for 1. or 2. Doing it for 3. when you haven't demonstrated 3. is premature optimization, AKA the root of all evil. Doing it for 1. or 2. is fine, but means that comments about efficiency or performance are irrelevant. FWIW, we have a large, soft-real-time system that makes extensive use of Unbounded_Strings, and have no problem meeting our timing requirements. -- Jeff Carter "My dear Mrs. Hemoglobin, when I first saw you, I was so enamored with your beauty I ran to the basket, jumped in, went down to the city, and bought myself a wedding outfit." Never Give a Sucker an Even Break 111