Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: caml (special) light and numerics
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1995-10-17 (18:26)
From: Thorsten Ohl <ohl@c...>
Subject: Re: caml (special) light and numerics
>>>>> "Xavier" == Xavier Leroy <> 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
`' 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

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 Ohl, TH Darmstadt, Schlossgartenstr. 9, D-64289 Darmstadt, Germany
//////////////// net:,
/// voice: +49-6151-16-3116, secretary: +49-6151-16-2072, fax: +49-6151-16-2421