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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 107f24,582dff0b3f065a52 X-Google-Attributes: gid107f24,public X-Google-Thread: 1014db,582dff0b3f065a52 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,582dff0b3f065a52 X-Google-Attributes: gid109fba,public X-Google-ArrivalTime: 2001-08-06 08:17:31 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!chcgil2-snf1.gtei.net!news.gtei.net!news.binc.net!kilgallen From: Kilgallen@eisner.decus.org.nospam (Larry Kilgallen) Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.lang.functional Subject: Re: How Ada could have prevented the Red Code distributed denial of service attack. Date: 6 Aug 2001 11:17:29 -0500 Organization: Berbee Information Networks Corporation Message-ID: References: <9k9if8$rn3$1@elf.eng.bsdi.com> <3B687EDF.9359F3FC@mediaone.net> <5267be60.0108021911.7d8fe4@posting.google.com> <3B6B637F.E3FA243E@worldnet.att.net> <3b6e9c33.1478392360@newsOrganization: LJK Software NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 997110606 16063 192.135.80.34 (6 Aug 2001 15:10:06 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Mon, 6 Aug 2001 15:10:06 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:11373 comp.lang.c:72465 comp.lang.c++:80323 comp.lang.functional:7344 Date: 2001-08-06T11:17:29-05:00 List-Id: In article <3b6e9c33.1478392360@news.worldonline.nl>, info@hoekstra-uitgeverij.nl (Richard Bos) writes: > Kilgallen@eisner.decus.org.nospam (Larry Kilgallen) wrote: > >> If you aspire to compare the speed of two languages, you must do so >> for equivalent programs. That means, at the gross level: >> >> Compare a default Ada program to a C program that has >> hand-coded checks everywhere Ada inserts checks. > > Erm, no. The standard C way is not to check every bound, every time. > Correct procedure is to design your program such that you _prevent_ > errors rather than detecting them as they occur; for example, input is > checked _once_, and then, if it passes the tests, assumed correct. You > don't go checking it every time you use it. > If you wish to claim this is not equivalent, very well; but you can't go > around claiming that C is bad simply because it doesn't do things the > Ada way. I did not claim that at all. I did say that if one wishes to compare the speed of code from compilers for two different languages one must write equivalent programs. Saying "take the default" for two different products is nonsense, just as much as you starting my copy of Netscape and expecting the screen will be the same as on your copy.