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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1ff542cf207f32ca X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.213.68 with SMTP id nq4mr14348362pbc.2.1328628422587; Tue, 07 Feb 2012 07:27:02 -0800 (PST) Path: lh20ni270896pbb.0!nntp.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Help needed - Upper Bound of an array - Question. Date: Tue, 07 Feb 2012 16:27:01 +0100 Organization: Ada @ Home Message-ID: References: <9203a648-af0d-45a1-87ba-67373435b391@k10g2000yqk.googlegroups.com> NNTP-Posting-Host: eQxAA/sqYBHh2aCJsHQRLA.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.61 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2012-02-07T16:27:01+01:00 List-Id: Le Tue, 07 Feb 2012 16:08:11 +0100, Ludovic Brenta = a =C3=A9crit: > Alternatively, you should consider replacing the array > with a rope (see = > http://en.wikipedia.org/wiki/Rope_%28computer_science%29). Or alternatively again, and as we can suppose there will be no insertion= = or removal (so much inefficient with an array, he would not have choose = an = array), a balanced binary tree, which is very fast and easy when created= = for a given fixed size. I did it some years ago, on a machine with heap = = fragmentation and no virtual memory. Above all, appending is still fast = = and simple, if ever the size has to be increased. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity