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: 103376,bc1361a952ec75ca X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,582dff0b3f065a52 X-Google-Attributes: gid1014db,public X-Google-ArrivalTime: 2001-08-07 12:46:27 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!msunews!scully!lamber45 From: David Lee Lambert Newsgroups: comp.lang.ada,comp.lang.c Subject: Re: How Ada could have prevented the Red Code distributed denial of service attack. Date: Tue, 7 Aug 2001 15:43:39 -0400 Organization: Michigan State University 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> NNTP-Posting-Host: scully.egr.msu.edu Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Sender: In-Reply-To: Xref: archiver1.google.com comp.lang.ada:11519 comp.lang.c:72736 Date: 2001-08-07T15:43:39-04:00 List-Id: On Mon, 6 Aug 2001, Ted Dennison wrote: > In article , Tor Rustad says... > > > >Write a "Hello world!" program in Java, and name one single case for which > >my C version will run slower. ;-) > > That's a bogus comparison. You are thinking of Java's propensity to create > interpreted code. That has nothing to do with Ada. (Although I suspect a Java > expert could probably accomplish it with JINI and a natively-targeted Java > compiler. Remember, "printf" actually has to stop and interpret the input string > to look for replacements. There's plenty of room for a speed improvement there). One could use puts() instead: #include int main() { puts("Hello World"); /* function adds a \n */ fflush(stdout); /* actually implied... */ return 0; } Practical comparison: a "Hello World" program in Java actually takes about 10 seconds to run on my 486, 33MHz. A fairly complex terminal-emulator loads up in a fraction of a second, as does any program I've ever written in C.