[Haskell-cafe] bytestring vs. uvector

Henning Thielemann lemming at henning-thielemann.de
Fri Mar 13 20:52:32 EDT 2009

On Mon, 9 Mar 2009, Alexander Dunlap wrote:

> - uvector, storablevector and vector are all designed for dealing with
> arrays. They *can* be used for characters/word8s but are not
> specialized for that purpose, do not deal with Unicode at all, and are
> probably worse at it. They are better for dealing with things that you
> would generally use arrays for.

Since the Storable instance of Char stores 32 bit values, I expect they 
store full Unicode codes and thus StorableVector can be used for Unicode 
strings without loss. They will require more memory than UTF8 strings, but 
whether they are faster or slower will depend on how expensive UTF8 
decoding/encoding is.

More information about the Haskell-Cafe mailing list