The latest version of bitvec is 1.1.5.0-2.

bitvec

Version 1.0.0.0 revision 0 uploaded by Bodigrim.

Package meta

Synopsis
Unboxed bit vectors
Description

Bit vectors library for Haskell.

The current vector package represents unboxed arrays of Bool allocating one byte per boolean, which might be considered wasteful. This library provides a newtype wrapper Data.Bit.Bit and a custom instance of unboxed Data.Vector.Unboxed.Vector, which packs booleans densely. It is a time-memory tradeoff: 8x less memory footprint at the price of moderate performance penalty (mostly, for random writes).

Thread safety

  • Data.Bit is faster, but thread-unsafe. This is because naive updates are not atomic operations: read the whole word from memory, modify a bit, write the whole word back.

  • Data.Bit.ThreadSafe is slower (up to 2x), but thread-safe.

Similar packages

  • bv and bv-little offer only immutable size-polymorphic bit vectors. bitvec provides an interface to mutable vectors as well.

  • array is memory-efficient for Bool, but lacks a handy Vector interface and is not thread-safe.

Author
Andrew Lelechenko <andrew.lelechenko@gmail.com>, James Cook <mokus@deepbondi.net>
Bug reports
n/a
Category
Data, Bit Vectors
Copyright
2019 Andrew Lelechenko, 2012-2016 James Cook
Homepage
https://github.com/Bodigrim/bitvec
Maintainer
Andrew Lelechenko <andrew.lelechenko@gmail.com>
Package URL
n/a
Stability
n/a

Components