Package1.3.0.1Foreign binding
rdtsc
Binding for the rdtsc machine instruction
- Version1.3.0.1
- CategoryForeign binding
- LicenceBSD-3-Clause
- AuthorMartin Grabmueller <martin@grabmueller.de>
- Maintainermartin@grabmueller.de
- Homepagegithub.com/mgrabmueller/rdtsc
- Pinned byhackage rdtsc 1.3.0.1
- Sourcehackage.haskell.org/package/rdtsc-1.3.0.1
Modules
1 module- System.CPUTime.Rdtsc1This module provides the function "rdtsc" for accessing the rdtsc
Description
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.
Depends on
1 package- base-4.20.2.0with GHC
Used by in this set · 0
Nothing in this set depends on it.