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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.39.209 with SMTP id n200mr2955818ion.55.1497544310682; Thu, 15 Jun 2017 09:31:50 -0700 (PDT) X-Received: by 10.157.11.208 with SMTP id 74mr185910oth.16.1497544310652; Thu, 15 Jun 2017 09:31:50 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!2.eu.feeder.erje.net!feeder.erje.net!2.us.feeder.erje.net!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!f20no831043itb.0!news-out.google.com!s132ni1378itb.0!nntp.google.com!185no830747itv.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 15 Jun 2017 09:31:50 -0700 (PDT) In-Reply-To: <44aa47f0-418a-4ede-b436-1937c3dbe065@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2003:e0:abd9:66fd:96de:80ff:fea6:6d64; posting-account=5zx--goAAAD06H29EnWQGKTO-gctuXHl NNTP-Posting-Host: 2003:e0:abd9:66fd:96de:80ff:fea6:6d64 References: <65c5271c-33a1-4f36-977e-372af449d9c1@googlegroups.com> <44aa47f0-418a-4ede-b436-1937c3dbe065@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <649ddcbf-c898-4115-bbe5-59d678a94727@googlegroups.com> Subject: Re: Poor performance with GNAT-GPL-2017 From: Charly Injection-Date: Thu, 15 Jun 2017 16:31:50 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:46950 Date: 2017-06-15T09:31:50-07:00 List-Id: Am Donnerstag, 15. Juni 2017 17:19:20 UTC+2 schrieb Charly: > Am Dienstag, 13. Juni 2017 21:46:13 UTC+2 schrieb alkh...@gmail.com: > > On Monday, June 12, 2017 at 6:28:17 PM UTC+3, Mark Lorenzen wrote: > > > On Saturday, June 10, 2017 at 1:23:34 PM UTC+2, Charly wrote: > > > > Hi, > > > >=20 > > > > when I found the new GNAT-GPL-2017 this morning I was happy and ins= talled it at once. > > > > But I was rather disappointed about the poor performance. > > > > To be more precise: > > > >=20 > > > > When I switch to new hard- or software I allways check the performa= nce with my private tool: > > > > It solves Rubics Tabgle https://www.jaapsch.net/puzzles/tangle.htm = with an ada programm, using one task per core. > > > >=20 > > > > With GNAT-GPL-2016 (gcc 4.9.4) it took about 0,4 sec to find both s= olutions, > > > > with GNAT-GPL-2017 (gcc 6.3.1) it takes about 0,8 sec to find both = solutions, > > > > which means the program is slower by a factor of 2. > > > >=20 > > > > In both cases I use the following options:=20 > > > > -O3 -gnatA -gnatn -funroll-loops -fPIC -gnatp -g -gnatW8 -gnatVn -m= tune=3Damdfam10 -gnat12 > > > >=20 > > > > Any ideas?? > > >=20 > > > Previous versions of GNAT did not have overflow check (-gnato) enable= d by default, whereas newer versions have. Maybe this is what you are seein= g. > > >=20 > > > Regards, > > >=20 > > > Mark L > >=20 > > I see Charly is compiling with '-gnatp'. Does it suppress the overflow = checks as well? > >=20 > > Charly, it can be an interesting experiment to trace the source of this= anomaly. This is strange that the compiler is emitting a code that is twic= e as slow. It can compile a specific language feature to be slower, but thi= s one needs to be run frequently enough in your program. Can you guess what= this feature can be? Maybe a profiler can help. > >=20 > > Can you try to compile your benchmark without tasking at all (remove th= e tasking code, rather than create 1 task)? > >=20 > > Can you use a different run time for the 2017 compiler? >=20 > ----- Some aditional strange results, all without any tasking (new option -t 0) gnat-gpl-2016 -O duration 3485 ms gnat-gpl-2016 -O2 duration 4713 ms gnat-gpl-2016 -O3 duration 2772 ms gnat-gpl-2017 -O duration 3375 ms gnat-gpl-2017 -O2 duration 4480 ms gnat-gpl-2017 -O3 duration 4823 ms To summarize I draw two conclusions This year optimization level -O is the best choice, Try several optimization levels next year when gnat-gpl-2018 is out.