[Haskell-cafe] ANNOUNCE: text, fast Unicode text support

Bryan O'Sullivan bos at serpentine.com
Wed Sep 8 00:44:32 EDT 2010

On Wed, Sep 1, 2010 at 12:29 PM, Daniel Fischer <daniel.is.fischer at web.de>wrote:

> I'm on Linux. I guess that's another point in favour of it:)
> Do you happen to know why it's slower on a Mac?

I'd guess because of something to do with the system iconv.

> So I tentatively believe most of the difference is spent doing the
> replacements.

I have a Replace.hs benchmark in the main text repo, just to be sure we're
talking about the same thing. Factoring out the time spent on I/O, with GHC
HEAD, my replace code takes twice the space and time of that in the
stringsearch package. Given that the space involved is just 121KB maximum
residency while processing a 124MB file, I'm not concerned about it. And the
time required isn't a bad place to start from, I think.

By the way, as this implies, I can't reproduce your space behaviour at all.

I can now say more. Looking at Data.Text.Lazy.replace,
> replace s d = intercalate d . split s

, I also got a space leak with that for BS.Lazy's intercalate and
> stringsearch's split.

How did you observe the space leak? Looking at -hT charted with hp2ps shows
me nothing, and the program executes in constant space regardless of input
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100907/3fecf0ff/attachment.html

More information about the Haskell-Cafe mailing list