bitwise-0.2: bitwise.cabal
Name: bitwise
Version: 0.2
Synopsis: fast multi-dimensional unboxed bit packed Bool arrays
Description:
Unboxed multidimensional bit packed Bool arrays with fast aggregate
operations based on lifting Bool operations to bitwise operations.
.
There are many other bit packed structures out there, but none met
all of these requirements:
.
(1) unboxed bit packed Bool array,
.
(2) multi-dimensional indexing,
.
(3) fast (de)serialization, or interoperable with foreign code,
.
(4) fast aggregate operations (fold, map, zip).
.
Quick tour of the bitwise library:
.
[Data.Bits.Bitwise] Lift boolean operations on 'Bool' to bitwise
operations on 'Data.Bits.Bits'.
.
[Data.Array.BitArray] Immutable bit arrays.
.
[Data.Array.BitArray.ST] Mutable bit arrays in 'Control.Monad.ST.ST'.
.
[Data.Array.BitArray.IO] Mutable bit arrays in 'IO'.
.
[Data.Array.BitArray.ByteString] (De)serialization.
.
[Codec.Image.PBM] Portable bitmap monochrome 2D image format.
.
Very rough performance benchmarks:
.
* immutable random access single bit reads:
@BitArray ix@ is about 40% slower than @UArray ix Bool@,
.
* 'Control.Monad.ST.ST' mutable random access single bit reads:
@STBitArray s ix@ is about the same as @STUArray s ix Bool@,
.
* immutable map @Bool -> Bool@:
@BitArray ix@ is about 85x faster than @UArray ix Bool@,
.
* immutable zipWith @Bool -> Bool -> Bool@:
@BitArray ix@ is about 1300x faster than @UArray ix Bool@.
Homepage: https://code.mathr.co.uk/bitwise
License: BSD3
License-file: LICENSE
Author: Claude Heiland-Allen
Maintainer: claude@mathr.co.uk
Copyright: (c) 2012,2016,2018 Claude Heiland-Allen
Category: Data, Data Structures, Bit Vectors
Build-type: Simple
Cabal-version: >= 1.9.2
Extra-source-files:
README
base21/Compat.hs
base40/Compat.hs
base45/Compat.hs
base47/Compat.hs
Library
Exposed-modules:
Data.Bits.Bitwise
Data.Array.BitArray
Data.Array.BitArray.IO
Data.Array.BitArray.ST
Data.Array.BitArray.ByteString
Codec.Image.PBM
Other-modules:
Data.Array.BitArray.Internal
Compat
Build-depends:
bytestring < 0.11,
array < 0.6
HS-source-dirs: src
if (impl(hugs))
HS-source-dirs: base21
Build-depends: base >= 2.1 && < 4.0
if (impl(ghc < 7.4))
HS-source-dirs: base40
Build-depends: base >= 4.0 && < 4.5
if (impl(ghc >= 7.4) && impl(ghc < 7.8))
HS-source-dirs: base45
Build-depends: base >= 4.5 && < 4.7
if (impl(ghc >= 7.8))
HS-source-dirs: base47
Build-depends: base >= 4.7 && < 4.12
GHC-Options: -Wall
Test-Suite bitwise-testsuite
type: exitcode-stdio-1.0
main-is: extra/testsuite.hs
build-depends:
bitwise,
base,
QuickCheck >= 2.4 && < 2.12
Benchmark bitwise-benchmark
type: exitcode-stdio-1.0
main-is: extra/benchmark.hs
build-depends:
bitwise,
base,
array,
bytestring,
criterion >= 0.6 && < 1.5
source-repository head
type: git
location: https://code.mathr.co.uk/bitwise.git
source-repository this
type: git
location: https://code.mathr.co.uk/bitwise.git
tag: v0.2