[Haskell-cafe] [ANNOUNCE] text - fast Unicode text handling

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Fri Oct 22 04:30:05 EDT 2010

On 22 October 2010 16:38, Bryan O'Sullivan <bos at serpentine.com> wrote:
> [Blog copy of the announcement here.]
> I just pushed it to bitbucket and github, and you can install it from
> the text site on Hackage in the usual way:
> cabal update
> cabal install text
> What's in this release?
> New functions for reading integers and floating point numbers, an
> oft-requested feature. They're fast, too: they range from parity with their
> bytestring counterparts, to up to 4 times faster. You can expect to parse 3
> to 4 million Int values per second out of a text file, or up 2 million
> Double values per second. They're also easy to use, give error messages, and
> come in strict and lazy variants.
> UTF-8 decoding and encoding are now very fast. They're up to 9x faster than
> they were, and close to the performance of pure C UTF-8 decoding and
> encoding.
> The Eq and Ord instances are also now very fast, up to 5x faster than
> before. They're now faster than the bytestring instances.
> Several other common functions received drive-by performance improvements
> too.
> Better protection against rare crashes on really huge volumes of data.

Is there a "best practices" guide on how to deal with Text values?

For example, I assume that it's better to try and use Text throughout
rather than continually packing String values (in my case, I'm looking
at using Text for I/O in graphviz; should I then start using Text
rather than String for all the parameters?).

Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list