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] 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 (11:11)
From: Wolfgang Lux <wlux@u...>
Subject: Re: [Caml-list] Profiling a function execution
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. It is for such
reasons that Unix systems have an getrusage call.


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