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,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsread.com!newsprint.newsread.com!newspeer1.nwr.nac.net!solnet.ch!solnet.ch!newsfeed.freenet.de!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!newsfeeder.wxs.nl!transit.news.xs4all.nl!195.241.76.212.MISMATCH!tiscali!transit1.news.tiscali.nl!dreader2.news.tiscali.nl!not-for-mail Newsgroups: comp.lang.ada,comp.realtime,comp.software-eng Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110032222.447846.167060@g14g2000cwa.googlegroups.com> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> <87r7iu85lf.fsf@insalien.org> <1110052142.832650@athnrd02> <1110284070.410136.205090@o13g2000cwo.googlegroups.com> <395uqaF5rhu2mU1@individual.net> <112rs0bdr2aftdf@corp.supernews.com> <1inxxr988rxgg$.1w9dedak41k89.dlg@40tude.net> <112s1r0rf0o8nca@corp.supernews.com> <112sonip5v4dca6@corp.supernews.com> <112t3de6fu04f38@corp.supernews.com> <112u7undo5h2q0a@corp.supernews.com> From: Ludovic Brenta Date: Wed, 09 Mar 2005 23:34:48 +0100 Message-ID: <87sm34fnxz.fsf@insalien.org> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:Rp2Px1Kf686bd2qFR0kDoZ755zg= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Tiscali bv NNTP-Posting-Date: 09 Mar 2005 23:34:29 CET NNTP-Posting-Host: 83.134.240.205 X-Trace: 1110407669 dreader2.news.tiscali.nl 44105 83.134.240.205:33726 X-Complaints-To: abuse@tiscali.nl Xref: g2news1.google.com comp.lang.ada:8980 comp.realtime:1156 comp.software-eng:4715 Date: 2005-03-09T23:34:29+01:00 List-Id: Pascal Obry writes: > compiled for the C code using: > > $ gcc -o c_matrix -O2 matrix.c > > compiled for the Ada code using: > > $ gnatmake -f -O2 -gnatp matrix.adb -bargs -static > > (-bargs -static to use the static runtime, this is what C does in this case). > > I get: > > $ time matrix 100 > 270165 1061760 1453695 1856025 > > real 0m0.033s > user 0m0.010s > sys 0m0.020s > > $ time c_matrix 100 > 270165 1061760 1453695 1856025 > > real 0m0.033s > user 0m0.010s > sys 0m0.010s > > I see identical results here, this is on a Windows box using GCC 3.4.4 > and GNAT 5.03a. Of course this is no surprise since GNAT share the very same > backend! Yet this means just nothing. A good benchmark is done on real > applications. At least I hope it will dismiss the idea that Ada is inherently > slow. There is nothing in Ada that is designed to be slow, a good compiler for > Ada as a good compiler for any language should generate good code, that's all. Out of curiosity, could you try with: gnatmake -O2 -gnatVa -gnato matrix.adb and see if, with all checks turned on, there is a significant difference? -- Ludovic Brenta.