bitwise
Version 0.1.1.1 revision 0 uploaded by ClaudeHeilandAllen.
Package meta
- 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:
unboxed bit packed Bool array,
multi-dimensional indexing,
fast (de)serialization, or interoperable with foreign code,
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 thanUArray ix Bool
,Control.Monad.ST.ST mutable random access single bit reads:
STBitArray s ix
is about the same asSTUArray s ix Bool
,immutable map
Bool -> Bool
:BitArray ix
is about 85x faster thanUArray ix Bool
,immutable zipWith
Bool -> Bool -> Bool
:BitArray ix
is about 1300x faster thanUArray ix Bool
.
- Author
- Claude Heiland-Allen
- Bug reports
- n/a
- Category
- Data, Data Structures, Bit Vectors
- Copyright
- (c) 2012,2016 Claude Heiland-Allen
- Homepage
- http://code.mathr.co.uk/bitwise
- Maintainer
- claude@mathr.co.uk
- Package URL
- n/a
- Stability
- n/a