On Fri, Aug 13, 2010 at 4:43 PM, Johan Tibell <johan.tib...@gmail.com> wrote: > On Fri, Aug 13, 2010 at 4:24 PM, Kevin Jardine <kevinjard...@gmail.com> > wrote: >> >> I'm interested to see this kind of open debate on performance, >> especially about libraries that provide widely used data structures >> such as strings. >> >> One of the more puzzling aspects of Haskell for newbies is the large >> number of libraries that appear to provide similar/duplicate >> functionality. >> >> The Haskell Platform deals with this to some extent, but it seems to >> me that if there are new libraries that appear to provide performance >> boosts over more widely used libraries, it would be best if the new >> code gets incorporated into the existing more widely used libraries >> rather than creating more code to maintain / choose from. >> >> I think that open debate about performance trade-offs could help >> consolidate the libraries. >> >> Kevin > > I agree. > > Here's a rule of thumb: If you have binary data, use Data.ByteString. If you > have text, use Data.Text. Those libraries have benchmarks and have been well > tuned by experienced Haskelleres and should be the fastest and most memory > compact in most cases. There are still a few cases where String beats Text > but they are being worked on as we speak.
How about the case for text which is guaranteed to be in ascii/latin1? ByteString again? > > Cheers, > Johan > > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > > -- Work is punishment for failing to procrastinate effectively. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe