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] Profiling a function execution
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-11-15 (12:54)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Profiling a function execution
On Sat, Nov 15, 2003 at 12:11:17PM +0100, Wolfgang Lux wrote:
> Richard Jones wrote:
> >If you're using a Pentium-class machine, then a nice trick is to wrap
> >the RDTSC assembly instruction and call that. It returns number of
> >clock cycles elapsed (a 64 bit number IIRC). Here's some code to get
> >you started:
> This looks like complete nonsense to me. This will neither distinguish
> user and system mode execution times. Even worse, clock cycles will
> not have any meaning if the operating system chooses to perform a
> task switch while the profiled function is executed.

Obviously. It was only a suggestion after all ...


Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
'There is a joke about American engineers and French engineers. The
American team brings a prototype to the French team. The French team's
response is: "Well, it works fine in practice; but how will it hold up
in theory?"'

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