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] troubling results from profiling: compare_val
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-02-26 (17:03)
From: David Monniaux <David.Monniaux@e...>
Subject: [Caml-list] troubling results from profiling: compare_val
Dear Caml developers,

I profiled some mixed C/Caml program and saw that it spends 11% of its
time in compare_val(), as well as an important total time in compare().

Our code uses some maps on strings and many comparisons on int64's.

On the one hand, I tend to think that invoking a function that begins by
examining the concrete types of the data structures it is passed to when
those types are known at compilation time is a bit inefficient. On the
other hand, maybe the slight overhead is drowned in the whole time
necessary to make a native call and do the necessary comparisons in the
native code.

Is there a way to get more precise information than the one supplied by
ocamlprof -p / gprof on Linux/x86? How about a library using the TSC? A
Caml interface to Papi?


David Monniaux            http://www.di.ens.fr/~monniaux
Laboratoire d'informatique de l'École Normale Supérieure,
Paris, France

To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners