comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: Interfacing Ada multidimensional arrays with Fortran.
Date: Sat, 28 May 2011 17:45:59 +0100
Date: 2011-05-28T17:45:59+01:00	[thread overview]
Message-ID: <m2pqn26aew.fsf@pushface.org> (raw)
In-Reply-To: m2tycf5fh4.fsf@pushface.org

Simon Wright <simon@pushface.org> writes:

>> What are the performance issues by using the three possibilities
>> above ? (may be the community already had some interesting information
>> about this)
>
> I haven't measured this. Anyone else?

On Mac OS X, using GCC 4.6.0, with -O1, applying
System.Generic_Array_Operations.Transpose 10 times to a 100x100 matrix
took 900 us, whereas using assignment with convention Fortran took 90
us.

With -O2, the assignment was hoisted out of the loop.

I then made the target matrices volatile; the results are now

-O1:
Transposition: 1200 us
Assignment:     300 us

-O2:
Transposition:  500 us
Assignment:     300 us



  reply	other threads:[~2011-05-28 16:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27 20:50 Interfacing Ada multidimensional arrays with Fortran David Sauvage
2011-05-28  9:41 ` Simon Wright
2011-05-28 16:45   ` Simon Wright [this message]
2011-06-09  7:55     ` David Sauvage
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox