rdtsc

Binding for the rdtsc machine instruction https://github.com/mgrabmueller/rdtsc

Version on this page:1.3.0.1
LTS Haskell 9.18:1.3.0.1
Stackage Nightly 2017-12-14:1.3.0.1
Latest on Hackage:1.3.0.1
BSD3 licensed by Martin Grabmueller
Maintained by martin@grabmueller.de

Module documentation for 1.3.0.1

rdtsc - Binding for the rdtsc machine instruction

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.

----

Note: this package contains the file cycle.h by Matteo Frigo, which provides access to cycle counters on several architectures. The license for this file is included in the file LICENSE in this package.

----

Usage

Use

cabal install rdtsc

for building and installing system-wide, or

tar xzvf rdtsc-X.Y.Z.W.tar.gz
cd rdtsc-X.Y.Z.W
cabal sandbox init
cabal install

for building and installing in a sandbox.

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

Changes

1.3.0.1

  • Modernized package by switching README to markdown, adding ChangeLog.md
  • Updated links in rdtsc.cabal to point to Github
Depends on 1 package:
Used by 3 packages:
comments powered byDisqus