From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: GNAT can't vectorize Real_Matrix multiplication from Ada.Numerics.Real_Arrays. What a surprise!
Date: Sun, 18 Feb 2018 14:31:15 +0100
Date: 2018-02-18T14:31:15+01:00 [thread overview]
Message-ID: <p6bv74$ac$1@dont-email.me> (raw)
In-Reply-To: <83493d20-7001-405b-8658-8a3f5d6c90fa@googlegroups.com>
On 02/18/2018 01:05 PM, Bojan Bozovic wrote:
> Thanks very much for clarification! It's always good to learn something new, I suppose.
The real optimization in your example seems to be that the compiler optimizes
away the 10E6 loop around the in-line code, but not around the call to "*".
Removing both loops gives similar times for both multiplications. The call to
"*" will never be as fast because it copies its result into your variable.
Replacing Ada.Numerics.Real_Arrays with an instantiation of
Ada.Numerics.Generic_Real_Arrays gives an additional factor of 2 reduction.
--
Jeff Carter
Just as Khan was hindered by two-dimensional thinking in a
three-dimensional situation, so many developers are hindered
by sequential thinking in concurrent situations.
118
next prev parent reply other threads:[~2018-02-18 13:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-17 12:55 GNAT can't vectorize Real_Matrix multiplication from Ada.Numerics.Real_Arrays. What a surprise! Bojan Bozovic
2018-02-17 15:17 ` Bojan Bozovic
2018-02-17 15:49 ` Bojan Bozovic
2018-02-18 1:51 ` Bojan Bozovic
2018-02-18 10:35 ` Jeffrey R. Carter
2018-02-18 12:05 ` Bojan Bozovic
2018-02-18 13:31 ` Jeffrey R. Carter [this message]
2018-02-18 19:38 ` Bojan Bozovic
2018-02-18 21:48 ` Nasser M. Abbasi
2018-02-18 22:50 ` Bojan Bozovic
2018-02-19 21:08 ` Robert Eachus
2018-02-20 2:31 ` Bojan Bozovic
2018-02-26 6:58 ` Robert Eachus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox