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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a65bb7bde679ed1d,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.35.68 with SMTP id f4mr31979654pbj.5.1322579855253; Tue, 29 Nov 2011 07:17:35 -0800 (PST) Path: lh20ni37925pbb.0!nntp.google.com!news1.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Natasha Kerensikova Newsgroups: comp.lang.ada Subject: Ann: Natools.Chunked_Strings, beta 1 Date: Tue, 29 Nov 2011 15:16:16 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: Mime-Version: 1.0 Injection-Date: Tue, 29 Nov 2011 15:16:16 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="Mda950WjNwNLAFOE7yJXQw"; logging-data="20369"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bgCJgad4uB6Sa4IpNuIO8" User-Agent: slrn/0.9.9p1 (FreeBSD) Cancel-Lock: sha1:nnxUoOH0p1HA8zlsT3eBAhcZK7I= Xref: news1.google.com comp.lang.ada:19237 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: 2011-11-29T15:16:16+00:00 List-Id: Hello, my main project is currently an improved rewrite of a library I wrote in C, with a (hopefully) better design. In the C version, the speed bottleneck was in the dynamic buffers where the resulting string is accumulated. As I hoped to eventually reach the same point in Ada, I used a String_Accumulator interface in the main project, so that I can easily switch accumulator implementation, possibly to something more efficient but more complex. At first I imagined to way of implementing a fast large string accumulation mechanism: ropes, and brutal preallocation of massive amounts of memory. I started writing the latter, as part of my efforts to teach myself Ada, because it seemed easier. Chunked_String is a string container that exposes the same interface as Unbounded_String, but whose implementation is using independant "chunks" of memory. Thus large strings don't have to fit in a contiguous memory space, and append operations are much more efficient by having to resize only the last chunk. So now I'm publishing this code under ISC licence, hoping it can be useful to someone and/or trigger useful comments to help me get better at Ada. The code is available in the Natools repository at: http://fossil.instinctive.eu/natools/dir?ci=tip Just like Natools.Getopt_Long, all constructive comments are welcome, about design, implementation, style, or anything else. (And will probably also not be acted upon immediately, I'm juggling with more tasks than I can comfortably schedule, but they were listened to and appreciated.) Thanks in advance for your help, Natasha