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,ad4585f2971e47c5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!xlned.com!feeder7.xlned.com!news2.euro.net!newsfeed.freenet.ag!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Sat, 19 Feb 2011 15:36:45 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.14) Gecko/20110123 Thunderbird/3.1.8 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Need some light on using Ada or not References: <4d5ef836$0$23753$14726298@news.sunsite.dk> <7ibvl6tn4os3njo3p4kek9kop44nke3n7t@4ax.com> In-Reply-To: <7ibvl6tn4os3njo3p4kek9kop44nke3n7t@4ax.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4d5fd57d$0$6992$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 19 Feb 2011 15:36:45 CET NNTP-Posting-Host: 56abcffb.newsspool4.arcor-online.net X-Trace: DXC=0QZKloJVfCL2:OR3:3gaE@4IUKejVHi?=9CFlZ30F3^<9D24DQ5H X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:18422 Date: 2011-02-19T15:36:45+01:00 List-Id: On 2/19/11 2:07 PM, Brian Drummond wrote: > On 18 Feb 2011 22:52:38 GMT, "Luis P. Mendes" wrote: >> I have some questions, however, that I'd like to be answered: >> 1. If Ada is more type safe and restricted than C++, how can it be >> significantly slower? >> Please see: http://shootout.alioth.debian.org/u64q/benchmark.php? >> test=all&lang=gnat >> where for some tests, Ada is 2x, 3x, 4x and 5x slower. > > Two possible reasons; both come down to the relative number of people developing > for both languages. Some reasons are pretty simple: when the results are due to specialized libraries used, rather than a consequence of the properties of the respective language (built in storage management features in this test). (Also interesting: The Java versions vary widely, and some are fast even though the solutions uses plain Java.) The leading C and C++ entries win by making these choices: C #includes , that is, it exercises the Apache memory pool, not what is available with plain C. C++ #includes a similar thing from the Boost libraries. This is allowed by the test's rules and authorities, but it may make some conclude that relative speed differences are due to the language choice when they aren't. > Single processor, the Ada version is just 38% slower, with half the memory > footprint; probably a damn good compromise between footprint and speed. > However the C++ version exploits 4 cores. Given Ada's support for concurrent > tasks, that suggests some room for improvement... I vaguely remember that it has been tried before, but so far there is no better solution.