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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5395b8f41548bf11 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Interfacing Ada multidimensional arrays with Fortran. Date: Sat, 28 May 2011 17:45:59 +0100 Organization: A noiseless patient Spider Message-ID: References: <27d4e9af-ffd0-4c12-80ed-b51deea95506@q32g2000yqn.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="13036"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++HMNsxsU4/7r/B9qHah9vobzxAVcoAwM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:0GsR4E5vQ+awqtOELe6NK3EyABc= sha1:y+0SxXadie8cKua0cKgz6n20Wh4= Xref: g2news1.google.com comp.lang.ada:19536 Date: 2011-05-28T17:45:59+01:00 List-Id: Simon Wright 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