@hackage rdtsc1.1.1
Binding for the rdtsc machine instruction
Installation
CustomDependencies (1)
Dependents (10)
@hackage/picosat, @hackage/random, @hackage/intel-aes, @hackage/rcu, @hackage/acme-everything, @hackage/lvish, Show all…
-*-outline-*-
- README file for Rdtsc binding
This small Cabal package provides a Haskell binding to the "rdtsc" machine instruction on modern IA-32 processors. This instruction can be used to read the number of cycles since processor startup and gives very accurate timing information.
** Usage
Use
runghc Setup.hs configure runghc Setup.hs build runghc Setup.hs install
for building and installing system-wide, or
runghc Setup.hs configure --prefix=$HOME/haskell-modules runghc Setup.hs build runghc Setup.hs install --user
for building and installing in directory $HOME/haskell-modules.
Just import module "System.CPUTime.Rdtsc" into your Haskell file and use
ghc --make FILENAME
to compile your program.
The "tests" directory contains a small test program for the module and demonstrates its usage. There is also a C version for this test program, to test the overheads of Haskell's FFI.
Happy Haskell hacking, Martin