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: g2news1.google.com!news1.google.com!goblin2!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Need some light on using Ada or not Date: Sun, 20 Feb 2011 22:47:05 +0000 Organization: A noiseless patient Spider Message-ID: References: <4d5ef836$0$23753$14726298@news.sunsite.dk> <7ibvl6tn4os3njo3p4kek9kop44nke3n7t@4ax.com> <4d5fd57d$0$6992$9b4e6d93@newsspool4.arcor-online.net> <4D617036.4080902@obry.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="30329"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18LR9uQKpdWr8w+2ycFfv/wzyh5sxlPzS0=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:SsG5zzwAKV8g+EtJbcXVjTSNanw= sha1:i2yeuSCmHfJbATrSePiOi+1q+lU= Xref: g2news1.google.com comp.lang.ada:17504 Date: 2011-02-20T22:47:05+00:00 List-Id: Brian Drummond writes: > the 100% overhead (on this test case) imposed by the pthread library > (which I think is how Gnat implements its tasking) Here (Mac OS X, GCC 4.6.0 x86_64 experimental), I tried modifying the Ada code to use the same tasking (threading) structure as the C GNU GCC #5 version. Result (I only checked with parameter 16): C: real 5.1 user 9.0 GNAT (orig): real 6.0 user 5.8 GNAT (mod): real 5.3 user 9.4 (the 'user' value, which is what time(1) reports, is apparently the total CPU time, while the 'real' time is the elapsed time; this machine has 2 cores, both it seems running at about 90% in the test).