IORefCAS alternatives and similar packages
Based on the "Data" category.
Alternatively, view chaselev-deque alternatives based on common mentions on social networks and blogs.
-
semantic-source
Parsing, analyzing, and comparing source code across many languages -
lens
Lenses, Folds, and Traversals - Join us on web.libera.chat #haskell-lens -
text
Haskell library for space- and time-efficient operations over Unicode text. -
code-builder
Packages for defining APIs, running them, generating client code and documentation. -
cassava
A CSV parsing and encoding library optimized for ease of use and high performance -
unordered-containers
Efficient hashing-based container types -
compendium-client
Mu (μ) is a purely functional framework for building micro services. -
holmes
A reference library for constraint-solving with propagators and CDCL. -
primitive
This package provides various primitive memory-related operations. -
resource-pool
A high-performance striped resource pooling implementation for Haskell -
binary
Efficient, pure binary serialisation using ByteStrings in Haskell. -
discrimination
Fast linear time sorting and discrimination for a large class of data types -
reflection
Reifies arbitrary Haskell terms into types that can be reflected back into terms -
dependent-sum
Dependent sums and supporting typeclasses for comparing and displaying them -
dependent-map
Dependently-typed finite maps (partial dependent products) -
orgmode-parse
Attoparsec parser combinators for parsing org-mode structured text! -
streaming
An optimized general monad transformer for streaming applications, with a simple prelude of functions -
text-icu
This package provides the Haskell Data.Text.ICU library, for performing complex manipulation of Unicode text. -
scientific
Arbitrary-precision floating-point numbers represented using scientific notation -
uuid-types
A Haskell library for creating, printing and parsing UUIDs
Static code analysis for 29 languages.
Do you think we are missing an alternative of IORefCAS or a related project?
README
Build Status and unit tests
- Jenkins:
-- Basic primops only, i.e.
atomic-primops
package: - Jenkins:
-- all Queue and Deque data structures in this package.
- Travis:
-- combined build&test for all packages in the repo.
Contents of this Repository
This is a multi-package repository. The following directories each correspond to exactly one cabal package:
- [abstract-deque]: AbstractDeque - abstract interface for single and double ended queues, plus reference implementation in pure Haskell
- [lockefree-queue]: classic Michael & Scott algorithm for single ended queues
- [chaselev-deque]: work-stealing "1.5" ended deques.
- [mega-deque]: a package that picks the best implementation for the interface constraints, which are expressed at the type level.
- [atomic-primops]: safe CAS/FAA (compare-and-swap/fetch-and-add) on various kinds of mutable locations
- [atomic-primops-foreign]: Add on package that provides an FFI based implementation of counters.
Please see the .cabal files for more detailed descriptions of each package.
How to Test and Install
First, to use compare-and-swap based data structures, you should be using GHC 7.4.1 or later. Some of these libaries will be forced to "fake it" on earlier versions of GHC.
You can install all of the packages in your user's .cabal directory with the following command:
./install_all.sh
You may also want to build the tests at the same time:
./install_all.sh --enable-tests
There are currently [2012.02.29] some problems with cabal failing to
automatically install dependencies for tests (as opposed to
libraries). You may have to manually install some packages via cabal
(e.g. test-framework-HUnit
).
If you take a look at that install_all.sh
script, you'll notice you
can also configure which executables for cabal
and ghc
it uses,
for example:
GHC=ghc-7.4.1 CABAL=cabal-0.10.2 ./install_all.sh --enable-tests
Next, you can run the tests like this:
./MichaelScott/dist/build/test-lockfree-queue/test-lockfree-queue
That test should complete successfully with a zero exit code.
Note that if you have trouble building test-suites through cabal, you can build them manually with GHC using a command like the following:
cd MichaelScott/
ghc-7.4.1 -O2 -threaded -rtsopts Test.hs -o Test.exe
Building with Profiling for debugging:
ghc-7.4.1 -prof -osuf=o_p -O2 -threaded -rtsopts Test.hs -o Test.exe
You might have to reinstall some of the dependencies with profiling enabled:
cabal install -p hostname xml regex-base regex-posix ansi-terminal ansi-wl-pprint test-framework test-framework-hunit --reinstall
Reinstalling with profiling can be REALLY annoying once the libraries are already installed. For example, if you forget a dependency above it will complete most of the compile, giving you the "profiling version not available" error only later on, resulting in a quadratic compilation process as you reinstall, add one more dep, reinstall, repeat.
KNOWN PROBLEMS
TODO
It would be nice to add a binding to TBB concurrent queues or other foreign implementations (for storable types).
Test on windows. (It hasn't been tried.)