[Haskell-cafe] Array, Vector, Bytestring

Bas van Dijk v.dijk.bas at gmail.com
Wed Jun 5 13:04:12 CEST 2013

On 5 June 2013 11:50, Peter Simons <simons at cryp.to> wrote:
> I meant to say that there is redundancy in *both*. The libraries
> mentioned in this thread re-implement the same type internally and
> expose APIs to the user that are largely identical.

I agree. I hope that ByteStrings will be replaced by a Storable.Vector
of Word8 at some point in the future.

To make the transition easier I have an experimental library which
defines a ByteString as a type synonym of a Storable.Vector of Word8
and provides the same interface as the bytestring package:


It includes a comprehensive benchmark suite which compares it to
bytestring. IIRC some functions are way faster in vector than their
bytestring equivalents and they have the potential to fuse. However
some functions are still way slower so more work has to be done in
vector to beat bytestring completely.


More information about the Haskell-Cafe mailing list