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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a5d:948f:: with SMTP id v15mr31443275ioj.93.1559886088526; Thu, 06 Jun 2019 22:41:28 -0700 (PDT) X-Received: by 2002:a9d:1b21:: with SMTP id l30mr12483904otl.5.1559886088302; Thu, 06 Jun 2019 22:41:28 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.166.215.MISMATCH!s188no165424itb.0!news-out.google.com!l126ni230itl.0!nntp.google.com!g15no159487itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 6 Jun 2019 22:41:27 -0700 (PDT) In-Reply-To: <877e9yxamb.fsf@nightsong.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2001:8004:1420:de2:3c2c:6580:a925:cfe; posting-account=rfeywQoAAAC0TKn5ZjdVW0ytcQM1oMSv NNTP-Posting-Host: 2001:8004:1420:de2:3c2c:6580:a925:cfe References: <55b14350-e255-406c-ab11-b824da77995b@googlegroups.com> <6776b034-1318-49b3-8ff5-5a2f746fac9c@googlegroups.com> <87blzaxnei.fsf@nightsong.com> <877e9yxamb.fsf@nightsong.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <5425afe3-8e22-4b1b-913c-f274fac7021a@googlegroups.com> Subject: Re: Toy computational "benchmark" in Ada (new blog post) From: David Trudgett Injection-Date: Fri, 07 Jun 2019 05:41:28 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:56523 Date: 2019-06-06T22:41:27-07:00 List-Id: Il giorno venerd=C3=AC 7 giugno 2019 14:50:07 UTC+10, Paul Rubin ha scritto= : >=20 > C++ version results: single threaded 45.73 seconds cpu, 47.36 sec elapsed= . > Multi-threaded (4 threads): 84.34 sec cpu, 23.11 sec elapsed. You have not coded the same thing as the Ada code. Do you know any Ada at a= ll? >=20 > That's using GCC 6.03 with threading done by std::future's async > function. So both versions are a fair amount faster than the Ada > version, but the threading speedup is nowhere near as good. I wonder > what's going on with that. At each of the 50 calculation runs, I launch > 4 threads=20 As you should know, the Ada code does not do this. > for slices of the array, then wait for them to complete and > sum the results, so there might be a little bit of idle time if the > threads don't all use the exact same amount of time. While eye-balling the Ada test runs, it seems that each of the eight tasks = take virtually identical times. I didn't bother outputting the individual r= un times, however. >=20 > I also want to try with transform_map_reduce and maybe the new Intel TBB > library with GCC 9. It is possible that transform_map_reduce can use > Intel SIMD intrinsics but otherwise they can be called directly with > some hassle. Also I can run on a machine with AVX512. >=20 > I guess the next thing after that would be OpenCL or CUDA and a graphics > card. Good luck with that! :-) Cheers, David