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-26 (12:23)
From: Ville-Pertti Keinonen <will@e...>
Subject: Re: [Caml-list] Profiling a function execution
On Tue, Nov 25, 2003 at 07:05:53PM +0100, Xavier Leroy wrote:

> At least under Linux, getrusage() doesn't provide more accuracy than
> times(), since the kernel maintains user and system time as an
> integral number of clock ticks.  I haven't looked at other Unix
> kernels, but I suspect that the additional precision made possible by
> the getrusage() syscall is simply not exploited.  

4.4 BSD derivatives (except Darwin/MacOS X).


> (Besides, times() is part of the POSIX standard while getrusage() is not,
> meaning less portability.)

You can always use something like #ifdef HAS_GETRUSAGE

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