Re: caml (special) light and numerics

Thorsten Ohl (ohl@crunch.ikp.physik.th-darmstadt.de)
Tue, 17 Oct 1995 16:57:17 +0100

Date: Tue, 17 Oct 1995 16:57:17 +0100
Message-Id: <9510171557.AA19603@crunch>
From: Thorsten Ohl <ohl@crunch.ikp.physik.th-darmstadt.de>
To: Xavier Leroy <Xavier.Leroy@inria.fr>
Subject: Re: caml (special) light and numerics
In-Reply-To: <199510161820.TAA02159@pauillac.inria.fr>
<199510161820.TAA02159@pauillac.inria.fr>

>>>>> "Xavier" == Xavier Leroy <Xavier.Leroy@inria.fr> writes:

Xavier> Your mileage may vary greatly, in particular depending on how
Xavier> carefully the CSL programs are written.

This may be asking too much, but are there any (written) guidelines
for efficient numerical CSL coding (besides the one on the WWW site
that gave me some hints)? I'm trying to find out if a CSL like
language can be useful in physics simulations. There will be *some*
speed penalty, but the important question is whether the elegance of a
modern language is worth this penalty.

I guess what I'm looking for are also some examples, because the
typical tutorials and textbooks stay away from numerical applications.

An example: the FORTRAN or C programmers in me sometimes want an
array local to a function, which would be cheap, because it's
allocated on the stack. But CSL will allocate it on the heap if I use
`Array.new' and I assume that this is expensive. Is this true and are
there any standard procedures around it? (Typical example)

val f : float array -> float array

will certainly be expensive, but a `subroutine'

val g : float array -> unit

modifying the vector in place will also (in general) need a temporary
array to store either input or output.

Another example: how can I find out (without deciphering assembler
code) if a particular recursive function has been recognized as tail
recursive?

Xavier> Also, the I386 port of CSL is not as good as the other ports
Xavier> on floating-point operations

I can imaginee, but I'm still wating for these cheap Alpha-clones to
take off. Unfortunately most fast machines I have an account on are
either HP-PA or RS6000 ...

Thanks for your attention,
-Thorsten

/// Thorsten Ohl, TH Darmstadt, Schlossgartenstr. 9, D-64289 Darmstadt, Germany
//////////////// net: ohl@crunch.ikp.physik.th-darmstadt.de, ohl@gnu.ai.mit.edu
/// voice: +49-6151-16-3116, secretary: +49-6151-16-2072, fax: +49-6151-16-2421