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.36.95.77 with SMTP id r74mr10382428itb.35.1518994236113; Sun, 18 Feb 2018 14:50:36 -0800 (PST) X-Received: by 10.157.113.143 with SMTP id o15mr657962otj.6.1518994235984; Sun, 18 Feb 2018 14:50:35 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!w142no1254508ita.0!news-out.google.com!s63ni2971itb.0!nntp.google.com!o66no1253456ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 18 Feb 2018 14:50:35 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=87.116.179.50; posting-account=z-xFXQkAAABpEOAnT3LViyFXc8dmoW_p NNTP-Posting-Host: 87.116.179.50 References: <83493d20-7001-405b-8658-8a3f5d6c90fa@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <80df92b1-e533-4f8a-8ed5-181976640e3d@googlegroups.com> Subject: Re: GNAT can't vectorize Real_Matrix multiplication from Ada.Numerics.Real_Arrays. What a surprise! From: Bojan Bozovic Injection-Date: Sun, 18 Feb 2018 22:50:36 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2421 X-Received-Body-CRC: 515318449 Xref: reader02.eternal-september.org comp.lang.ada:50506 Date: 2018-02-18T14:50:35-08:00 List-Id: On Sunday, February 18, 2018 at 10:48:42 PM UTC+1, Nasser M. Abbasi wrote: > On 2/18/2018 1:38 PM, Bojan Bozovic wrote: >=20 > If you are doing A*B by hand, then you are doing something > wrong. Almost all languages end up calling Blas > Fortran libraries for these operations. Your code and > the Ada code can't be faster. >=20 > http://www.netlib.org/blas/ >=20 > Intel Math Kernel Library has all these. >=20 > https://en.wikipedia.org/wiki/Math_Kernel_Library >=20 > --Nasser Well I wanted to compare how Ada would do against C simply in 4x4 matrix mu= ltiplication, and I was surprised to see several times slower results, so I= tried then to code 'by hand' to attempt to achieve the same speed with Ada= (and the speed is comparable). I'm just learning the language and so I was= unaware of it's finesses (such as making new instance of Ada.Numerics.Gene= ric_Real_Arrays). Thanks for the links. I will have to bookmark them.