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.3.223 with SMTP id e92mr3513975ioi.98.1497383171605; Tue, 13 Jun 2017 12:46:11 -0700 (PDT) X-Received: by 10.157.24.54 with SMTP id b51mr190492ote.14.1497383171573; Tue, 13 Jun 2017 12:46:11 -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!news.glorb.com!f20no831302itb.0!news-out.google.com!k7ni7086itk.0!nntp.google.com!f20no831297itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 13 Jun 2017 12:46:11 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=109.66.107.121; posting-account=2RssqAoAAACIh3RbfQ_K0INRqrZzhIyi NNTP-Posting-Host: 109.66.107.121 References: <65c5271c-33a1-4f36-977e-372af449d9c1@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Poor performance with GNAT-GPL-2017 From: alkhimey@gmail.com Injection-Date: Tue, 13 Jun 2017 19:46:11 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:46943 Date: 2017-06-13T12:46:11-07:00 List-Id: 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 install= ed 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 performance = 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 solut= ions, > > with GNAT-GPL-2017 (gcc 6.3.1) it takes about 0,8 sec to find both solu= tions, > > 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 -mtune= =3Damdfam10 -gnat12 > >=20 > > Any ideas?? >=20 > Previous versions of GNAT did not have overflow check (-gnato) enabled by= default, whereas newer versions have. Maybe this is what you are seeing. >=20 > Regards, >=20 > Mark L I see Charly is compiling with '-gnatp'. Does it suppress the overflow chec= ks as well? Charly, it can be an interesting experiment to trace the source of this ano= maly. This is strange that the compiler is emitting a code that is twice as= slow. It can compile a specific language feature to be slower, but this on= e needs to be run frequently enough in your program. Can you guess what thi= s feature can be? Maybe a profiler can help. Can you try to compile your benchmark without tasking at all (remove the ta= sking code, rather than create 1 task)? Can you use a different run time for the 2017 compiler?