[Haskell-cafe] Announce: Package rdtsc for reading IA-32 time stamp counters

John Meacham john at repetae.net
Tue Jan 23 21:09:21 EST 2007


On Tue, Jan 23, 2007 at 04:10:10PM -0800, Bryan O'Sullivan wrote:
> John Meacham wrote:
> >I would think this would be how the haskell 98 standard library CPUTime
> >is implemented, is it not?
> 
> No.  System.CPUTime gives you an approximate idea of the amount of CPU 
> time your process, and all its threads, have used.  The rdtsc 
> instruction gives you a snapshot of the current CPU's cycle counter, 
> regardless of who (if anyone) has been burning those cycles.

ah, of course. I made the same mistake before. carry on. :)

the linux kernel source has readtsc equivalants for a bunch of different
architectures, a simple CPP switch would allow support for most
everything.

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Haskell-Cafe mailing list