thread-local-storage

Thread-local storage, or TLS, is an important ingredient in many algorithms and data structures. The GHC compiler does not provide a built-in notion of TLS either at the IO-thread or OS thread level. This package provides a few different implementations of a simple TLS API. All exported public modules provide exactly the same interface with different implementations. Run the included criterion benchmark suite to ascertain which performs the best on your platform. Example criterion benchmark data can be found here (from an Intel Ivy-Bridge i7-3770 desktop): http://www.cs.indiana.edu/~rrnewton/datasets/xmen_tls_report.html


Keywords
library, system, Propose Tags, http://www.cs.indiana.edu/~rrnewton/datasets/xmen_tls_report.html, Skip to Readme, , Index, Data.TLS.GHC, Data.TLS.PThread, Data.TLS.PThread.Internal, thread-local-storage-0.2.tar.gz, browse, Package description, Package maintainers, RyanNewton, ryanglscott, edit package information
License
BSD-3-Clause
Install
cabal install thread-local-storage-0.1.0.0

Documentation

thread-local-storage

Hackage Hackage Dependencies Haskell Programming Language BSD3 License Build

See .cabal file for description.

Here are some example benchmark results (on an Ivy Bridge i7-3770), with a typical time of 10.4 nanoseconds to get to a TLS variable given one IO thread per OS thread:

example benchmarks