www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/19/03:19:27

Date: Wed, 19 Feb 1997 10:11:53 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: kagel AT dg1 DOT bloomberg DOT com
cc: jbennett AT ti DOT com, djgpp AT delorie DOT com
Subject: Re: Netlib code [was Re: flops...]
In-Reply-To: <9702182137.AA02157@quasar.bloomberg.com >
Message-ID: <Pine.SUN.3.91.970219100950.22519I-100000@is>
MIME-Version: 1.0

On Tue, 18 Feb 1997 kagel AT quasar DOT bloomberg DOT com wrote:

>    say the least.  The problem is not with the performance of the Fortran
>    code but with the memory bandwidth overhead associated with converting
>    the C row-major matrices to the Fortran column-major order prior to
> 
> What conversion?  The FORTRAN is not converting you arrays.  FORTRAN and C
> share a common calling convention (ignoring the facts that FORTRAN passes
> string lengths and always passes pointers).  They just disagree on which
> dimension to increment first.  You are not inverting the arrays are you?  Just
> declare the C arrays with the indices reversed and everything will be fine.

I don't know whether this is or isn't the problem which causes the 
slow-down, but note that accessing a large array columnwise might hurt 
performance due to CPU cache trashing and the virtual memory trashing (if 
the array is large enough to exceed the physical RAM).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019