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
[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  
Laboratoire d'informatique de l'École Normale Supérieure,
Paris, France

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: