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,7767a311e01e1cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.germany.com!newsfeed.utanet.at!newsfeed01.chello.at!newsfeed02.chello.at!news.hispeed.ch.POSTED!not-for-mail Message-Id: <1357646.gQpUc0sPYq@linux1.krischik.com> From: Martin Krischik Subject: Re: GNAT compiler switches and optimization Newsgroups: comp.lang.ada Date: Fri, 20 Oct 2006 18:30:29 +0200 References: <1161341264.471057.252750@h48g2000cwc.googlegroups.com> User-Agent: KNode/0.10.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@hispeed.ch Organization: hispeed.ch NNTP-Posting-Host: 80.218.115.143 (80.218.115.143) NNTP-Posting-Date: Fri, 20 Oct 2006 18:45:16 +0200 X-Trace: 692384538fd1cf57fd62a21018 Xref: g2news2.google.com comp.lang.ada:7087 Date: 2006-10-20T18:30:29+02:00 List-Id: tkrauss wrote: > Unfortunately the Ada code takes 3-4 times as long. Well, I collected the various suggestions made and created three test programs [1,2,3] where one is indeed faster then the next. GNAT 4.1.1 ./Linux-x86_64-Release/Test_Array_1 800 1.99202E+02 1.96854E+02 1.88844E+02 1.84498E+02 Time: 18.615262000 ./Linux-x86_64-Release/Test_Array_2 800 1.99202E+02 1.96854E+02 1.88844E+02 1.84498E+02 Time: 5.457141000 ./Linux-x86_64-Release/Test_Array_3 800 1.99202E+02 1.96854E+02 1.88844E+02 1.84498E+02 Time: 4.509063000 GNAT GPL 2006 (20060522-34) ./Linux-x86_64-Release/Test_Array_1 800 1.99202E+02 1.96854E+02 1.88844E+02 1.84498E+02 Time: 13.950607000 ./Linux-x86_64-Release/Test_Array_2 800 1.99202E+02 1.96854E+02 1.88844E+02 1.84498E+02 Time: 8.010260000 ./Linux-x86_64-Release/Test_Array_3 800 1.99202E+02 1.96854E+02 1.88844E+02 1.84498E+02 Time: 7.101502000 As options I used my trusted "Release" option which you can see here [4]. Martin [1]http://svn.sourceforge.net/viewvc/wikibook-ada/trunk/demos/Source/test_array_1.adb?view=markup [2]http://svn.sourceforge.net/viewvc/wikibook-ada/trunk/demos/Source/test_array_2.adb?view=markup [3]http://svn.sourceforge.net/viewvc/wikibook-ada/trunk/demos/Source/test_array_3.adb?view=markup [4]http://svn.sourceforge.net/viewvc/wikibook-ada/trunk/demos/GNAT/wikibook_ada.gpr?view=markup -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com