English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] floating point performance
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-05-30 (08:29)
From: Tom _ <tom7ca@y...>
Subject: [Caml-list] floating point performance
I have ported some numerical code from SML to O'Caml.
It seems to perform about about 1/5th the speed of
equivalent C code if I use "float array".  I did
look at the FAQ and at the numerical OCAML web
page at Inria, and found them helpful.

Using -unsafe didn't make a big difference, and
neither did eliminating the obvious sources of

I'm probably still consing in a number of 
places, but I can't get a good handle of 
what to do about it or which parts matter. 
Is there some way of getting a 
measure of the amount of consing that happens in a 
section of code?

The web page says that the O'Caml compiler will box
floating point numbers if I use recursive calls; is
that still true for tail recursive calls to functions
that are visible only locally?  It would seem that
that transformation should be pretty easy.

Is there a chance that using the new native types
would help?  How do they interact with tail recursive

Also, using Bigarray costs a factor of 3 in speed
compared to otherwise identical code.  The profiler
suggests that subscripting isn't getting inlined.
Is there some way of getting faster performance out
of Bigarray?

Thanks in advance for any hints you can offer.
If anybody is interested in taking a look, I can
send them the code separately.


Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr