[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic mutidimensional arrays

From: Fischlin Andreas
Subject: Re: Dynamic mutidimensional arrays
Date: Wed, 5 Apr 2023 08:46:21 +0000

Have you actually looked at LgMatrices? There is no such run time penalty from calling a procedure such as value(M, i,j). You simply write e.g.

     val := A^[i]^[k] * B^[k]^[j];

ETH Zurich, Prof. em. Dr. Andreas Fischlin, IPCC Vice-Chair WGII, Systems Ecology, CHN E 24, Universitaetstrasse 16, CH-8092 Zurich, SWITZERLAND
Tel: +41 44 633-6090   Mobile: +41 79 595-4050   Mail:

On 5 Apr 2023, at 10:08, Michael Riedl <> wrote:


if you have to call a function to access a single array element such a constuct would be a complete disaster form a runtime prospectice. And I not even talk about the readbility of the resulting code and the ability to debug it ...

I have part of code with O^3 (e.g. a simple matrix multiplication) up to O^5 dependencies of the size of the problem. It is heavily under-estimated by most programmers how e.g. cache efficiency and similar issue due influence the run-time in numerical analysis. I therefore can only warn from a statement such as "CPU and RAM are no constrains any more". Our programms even need hours or even days on current hardware for medium sized problems.

And you are absolutely right - I do not want to code everything again and again - there are mature libraries developed over decades and you cannot win the completion if its about runtime for them.



Am 05.04.23 um 09:41 schrieb Benjamin Kowarsch:

On Wed, 5 Apr 2023 at 16:39, Fischlin Andreas wrote:

val := value(A,i,k) * value(B,k,j);

I was under the impression Micheal wanted to avoid the function call. In particular because of the reference to interfacing to external library objects.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]