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: a07f3367d7,be98569334bf359 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!de-l.enfer-du-nord.net!gegeweb.org!aioe.org!nospam From: "John B. Matthews" Newsgroups: comp.lang.ada Subject: Re: C++ threads vs. Ada tasks - surprised Date: Mon, 17 Aug 2009 11:20:57 -0400 Organization: The Wasteland Message-ID: References: NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.7.9 Cancel-Lock: sha1:lhoFnsaydm83e9Jh0WuFmieWHoQ= User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Xref: g2news2.google.com comp.lang.ada:7843 Date: 2009-08-17T11:20:57-04:00 List-Id: In article , Maciej Sobczak wrote: [...] > My expectations were wrong, as the Ada version proved to be ~2x faster > on my machine (with GNAT 4.4.0 and g++ 4.4.0, taken from the same > package, both versions compiled with -O2). FWIW, the version Ada appears to be ~25% faster on Mac OS 10.5.8 with gcc 4.3.4. $ make cleaner run rm -f *.o *.ali b~* core rm -f *.s a.out atest ctest Darwin 9.8.0; gcc 4.3.4 gnatmake atest -cargs -O2 -bargs -shared -largs -dead_strip gcc -c -O2 atest.adb gnatbind -shared -x atest.ali gnatlink atest.ali -shared-libgcc -dead_strip Darwin 9.8.0; gcc 4.3.4 g++ -O2 ctest.cpp -o ctest time ./atest 500000 Executed 500000 iterations 3.48 real 1.97 user 3.33 sys time ./ctest 500000 Executed 500000 iterations 4.58 real 2.91 user 5.02 sys [...] -- John B. Matthews trashgod at gmail dot com