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] Where does Ocaml spend all the time?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-06-28 (10:03)
From: Florian Hars <florian@h...>
Subject: Re: [Caml-list] Where does Ocaml spend all the time?
On Thu, Jun 28, 2001 at 10:37:24AM +0200, Xavier Leroy wrote:
> string_equal is the string comparison operator (i.e. Caml's = operator
> at type string->string->bool).

Yes, that is one of the functions that I expected to take a lot of time,
since the program does a lot of string comparision and matching.
I was more surprised by the time spent in the <Modulename>_code_(begin|end)
functions, what are these? Why are they called and by whom?
> At any rate, the GC-related functions account for only 25% of the
> running time (which is typical for symbolic processing, but a bit high
> for numerical processing)

So this is OK (except that it is 25% of quite a lot of time :-)

> so the "order of magnitude" slowdown that
> you mention corresponds to other factors than just GC overhead

Once the functionality is complete, I'll work on some details of the

> My experience is that carefully written Caml code always deliver at
> least 50% of the performance of equivalent, carefully written C code.

Yes, that was my expectation, too, after reading some comparisions.
I'll try to see if the recomendations from the QandA help.
CAMLRUNPARAM='o=100' alone gives another two to three seconds,
this is a good start.

Yours, Florian Hars.
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr