[Haskell-cafe] Re: Over-allocation
gracjanpolak at gmail.com
Thu Nov 22 07:04:56 EST 2007
Gracjan Polak <gracjanpolak <at> gmail.com> writes:
> Don Stewart <dons <at> galois.com> writes:
> > ByteStrings have all the same operations as lists though, so you can
> > index, compare and take substrings, with the benefit that he underlying
> > string will be shared, not copied. And only use 1 byte per element.
> Is there any parser built directly over ByteString that I could look at?
> Or maybe somebody implemented something like Text.ParserCombinators.ReadP for
> >From the first sight it seems doable, so there is light at the end of the
> tunnel :)
Just a success report, after 58 min of coding I got kind of ReadP parser over
ByteString working and my memory usage went down from 1500MB to... 1.2MB! Over
1000 times better! Incredible!
Thanks for the suggestion to do it with ByteStrings!
I hope to publish it when I clean it up enough!
More information about the Haskell-Cafe