From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA15547; Wed, 26 Feb 2003 18:03:19 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA15551 for ; Wed, 26 Feb 2003 18:03:18 +0100 (MET) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h1QH3IH00536 for ; Wed, 26 Feb 2003 18:03:18 +0100 (MET) Received: from dmi.ens.fr (dmi.ens.fr [129.199.96.11]) by nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id h1QH3HM48957 for ; Wed, 26 Feb 2003 18:03:17 +0100 (CET) Received: from basilic.ens.fr (monniaux@basilic [129.199.99.48]) by dmi.ens.fr (8.10.1/jb-1.3-180200) id h1QH3Gn22324 for ; Wed, 26 Feb 2003 18:03:16 +0100 (MET) Received: from localhost (monniaux@localhost) by basilic.ens.fr (8.11.0/jb-1.1) id h1QH3DC10434 for ; Wed, 26 Feb 2003 18:03:13 +0100 (MET) X-Authentication-Warning: basilic.ens.fr: monniaux owned process doing -bs Date: Wed, 26 Feb 2003 18:03:13 +0100 (MET) From: David Monniaux X-Sender: monniaux@basilic.ens.fr To: Liste CAML Subject: [Caml-list] troubling results from profiling: compare_val Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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? Regards, 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