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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5bc4be576204aa20 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!proxad.net!193.252.118.146.MISMATCH!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Message-ID: <43783810.6080808@obry.net> Date: Mon, 14 Nov 2005 08:09:04 +0100 From: Pascal Obry Organization: Home - http://www.obry.net User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: fr, en MIME-Version: 1.0 Newsgroups: comp.lang.ada To: "Jeffrey R. Carter" Subject: Re: Buffer overflow Article - CACM References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit NNTP-Posting-Date: 14 Nov 2005 08:09:07 CET NNTP-Posting-Host: 81.249.126.214 X-Trace: 1131952147 news.wanadoo.fr 18301 81.249.126.214:1767 X-Complaints-To: abuse@wanadoo.fr Xref: g2news1.google.com comp.lang.ada:6368 Date: 2005-11-14T08:09:07+01:00 List-Id: Jeffrey, > Then they say that bounds checking adds 100% overhead. This may be true > of trying to patch C, but it's certainly not true of all the checks Ada > does, which is much more than simply bounds checking. In practice I have > never found a case in which leaving checks in was too slow, nor where > turning them off saved more than 10%. Probably because Ada can remove some checks at runtime. See recent thread on the subject. I think this really depends on your programming style, if your applications defines lot of types with appropriate constraints, it will help the compiler optimize away the checks. And then even if there was 100% overhead, what the problem ? For most applications this is not critical and at least for debugging the application this is invaluable. Running with a 100% overhead is equivalent to running with a computer 18 months old. Not that bad :) Again I understand that in some domains we are counting the CPU cycles, but this is not the majority of applications. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595