bitwise: fast multi-dimensional unboxed bit packed Bool arrays
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 onData.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
.
Modules
[Index]
Downloads
- bitwise-1.0.0.1.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.1, 0.1.0.1, 0.1.0.2, 0.1.1, 0.1.1.1, 0.2, 1.0.0.1 |
---|---|
Dependencies | array (<0.6), base (>=4.7 && <4.21), bytestring (<0.13) [details] |
License | BSD-3-Clause |
Copyright | (c) 2012,2016,2018 Claude Heiland-Allen |
Author | Claude Heiland-Allen |
Maintainer | claude@mathr.co.uk |
Revised | Revision 10 made by ClaudeHeilandAllen at 2024-09-17T10:23:42Z |
Category | Data, Data Structures, Bit Vectors |
Home page | https://code.mathr.co.uk/bitwise |
Source repo | head: git clone https://code.mathr.co.uk/bitwise.git this: git clone https://code.mathr.co.uk/bitwise.git(tag v1.0.0.1) |
Uploaded | by ClaudeHeilandAllen at 2018-04-26T05:41:54Z |
Distributions | Arch:1.0.0.1, LTSHaskell:1.0.0.1, NixOS:1.0.0.1, Stackage:1.0.0.1 |
Reverse Dependencies | 6 direct, 17 indirect [details] |
Downloads | 12720 total (48 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Last success reported on 2018-04-29 [all 1 reports] |