The rdtsc package

[ Tags: bsd3, foreign-binding, library ] [ Propose Tags ]

This module provides the function rdtsc for accessing the rdtsc machine register on modern IA-32 processors. This is a 64-bit counter which counts the number of processor cycles since the machine has been powered up. Using this instruction, you can make very precise time measurements which are independent of the actual CPU frequency. But note that you can get strange results sometimes on a superscalar processor.

Also note that the Haskell foreign function interface imposes some additional overheads. On my machine, it takes about 950 cycles to call this function twice and to compute the difference, whereas in C the overhead is only about 88 cycles.

Properties

Versions 1.1.1, 1.1.3, 1.1.3.1, 1.2.0.0, 1.3.0.0, 1.3.0.1
Dependencies base (==4.*) [details]
License GPL
Author Martin Grabmueller <martin@grabmueller.de>
Maintainer martin@grabmueller.de
Category Foreign binding
Home page http://code.haskell.org/rdtsc
Uploaded Wed Dec 1 20:24:30 UTC 2010 by MartinGrabmueller
Distributions LTSHaskell:1.3.0.1, NixOS:1.3.0.1, Stackage:1.3.0.1, Tumbleweed:1.3.0.1
Downloads 1550 total (13 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees