[Haskell-cafe] Re: String vs ByteString

Ketil Malde ketil at malde.org
Fri Aug 13 16:28:00 EDT 2010

Johan Tibell <johan.tibell at gmail.com> writes:

> Here's a rule of thumb: If you have binary data, use Data.ByteString. If you
> have text, use Data.Text.

If you have a large amount of mostly ASCII text, use ByteString, since
Data.Text uses twice the storage.  Also, ByteString might make more
sense if the data is in a byte-oriented encoding, and the cost of
encoding and decoding utf-16 would be significant.

If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell-Cafe mailing list