The rdtsc package
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.
|Versions||1.1.1, 1.1.3, 188.8.131.52, 184.108.40.206, 220.127.116.11, 18.104.22.168|
|Dependencies||base (==4.*) [details]|
|Author||Martin Grabmueller <firstname.lastname@example.org>|
|Uploaded||Mon Nov 29 20:15:59 UTC 2010 by MartinGrabmueller|
|Distributions||LTSHaskell:22.214.171.124, NixOS:126.96.36.199, Stackage:188.8.131.52, Tumbleweed:184.108.40.206|
|Downloads||1495 total (18 in the last 30 days)|
|Status||Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI
For package maintainers and hackage trustees