ByteStrings and the ram barrier

Tomasz Zielonka tomasz.zielonka at gmail.com
Tue May 16 05:24:59 EDT 2006


On Tue, May 16, 2006 at 11:10:04AM +0200, Tomasz Zielonka wrote:
> To process my data with Haskell, I would have to be able to decode it
> into records with efficiency close to what I achieve in C++ (say, at
> least 80% as fast). Until now I managed to get 33% of it in reasonably
> pure Haskell, which is not that bad IMO.

I forgot to add that I use Data.ByteString and mostly checked
head/tail/drop/take operations. I am already amazed that using those
high-level operations gives me such a good performance.  I mean, I know
what tricks you use to make it possible, but anyway it's remarkable...

But, like I said before, I will probably have to juggle Ptr's to get
through this 33% barrier. But I will surely still use ByteString, at
least for reading data from files and to keep the decoded strings.

BTW, would you recommend ByteString for keeping thousands of small
decoded strings? Their size will be around 50-100 characters (they
are mostly URIs) and their expected life time will be quite short
(I expect to hold around 10-100 such strings in memory 97% of the time,
and up to 1000000 strings in some rare cases).

Thanks for working on ByteString!

Best regards
Tomasz


More information about the Libraries mailing list