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 X-Google-Thread: 103376,1d575f572a099528 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-07 09:08:15 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!isdnet!newsfeed1.telenordia.se!news.algonet.se!algonet!newsfeed1.uni2.dk!news.net.uni-c.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: What is faster Ada or C? Date: Fri, 07 Dec 2001 18:08:14 +0100 Organization: Centre for Chaos and Turbulence Studies, Niels Bohr Institute Message-ID: <3C10F77E.6BDD9A3B@nbi.dk> References: <3c08314d$0$158$9b622d9e@news.freenet.de> <3C0BA624.7A12BFA1@boeing.com> <3C10C26B.AA451459@nbi.dk> NNTP-Posting-Host: alf.nbi.dk Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.net.uni-c.dk 1007744894 16972 130.225.212.55 (7 Dec 2001 17:08:14 GMT) X-Complaints-To: usenet@news.net.uni-c.dk NNTP-Posting-Date: Fri, 7 Dec 2001 17:08:14 +0000 (UTC) X-Mailer: Mozilla 4.78 [en] (X11; U; OSF1 V4.0 alpha) X-Accept-Language: fo,da,no,sv,is,de,fr,en Xref: archiver1.google.com comp.lang.ada:17589 Date: 2001-12-07T18:08:14+01:00 List-Id: Ted Dennison wrote: > > Ada.Text_IO.Put_Line ("X = " & Scalar'Image (X)); > .. > > cout << x << endl; > > Is that including these lines? These are two *very* different IO systems. I > think in his example Robert used C's printf in both programs. It includes those lines, but I can assure you that the results are similar without those lines. I just print the results, to make sure that clever compilers don't remove the loop completely. When I look at the corresponding assembler code (gnatgcc -S/g++ -S) I can see that GNU C++ inlines the square root function, while GNU Ada doesn't. Jacob -- SSLUG's julekalender - fra den 1. til den 24. december p�: http://www.sslug.dk/julekalender/