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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dab7d920e4340f12 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,dab7d920e4340f12 X-Google-Attributes: gid1014db,public From: Dale Stanbrough Subject: Re: C is 'better' than Ada because... Date: 1996/07/17 Message-ID: <4shanp$qg6@goanna.cs.rmit.edu.au>#1/1 X-Deja-AN: 168557169 distribution: world references: <4rr961$hdk@btmpjg.god.bel.alcatel.be> <4sgakm$kcu@wdl1.wdl.lmco.com> <4sgd4o$isk@btmpjg.god.bel.alcatel.be> content-type: text/plain; charset=ISO-8859-1 organization: RMIT, Melbourne, Australia mime-version: 1.0 newsgroups: comp.lang.ada,comp.lang.c Date: 1996-07-17T00:00:00+00:00 List-Id: Mark A Biggar writes: "In addition the above code make it almost impossible to optimize out unnecessary checks. The empirical evidence is that only about 10% of array bounds checks are really necessary, assuming that you can declare index variables that are limited in range to the array bounds, but you can't so that either in C (you can in C++, but that adds yet another layer of possible redundant checks that you can't easily optimize away.)" By special casing the array template, and providing a suitable iterator, couldn't a clever compiler optimize away most checks anyway? Dale