[Haskell-cafe] Announcing binary-parsers
drkoster at qq.com
Wed Oct 12 01:53:45 UTC 2016
I'm not familiar enough with attoparsec's internal to give you a concrete answer, since the core parser type of binary and attoparsec is so different. But I guess it may have something to do with ghc specializer, because attoparsec try to parametrize the input type to support both Text and ByteString (which is a bad decision IMHO).
Actually I think current binary's Decoder type can be improved further following attoparsec: the Pos state is encoded directly into CPS parser type, I'll try to see if this is an improvement or not.
In an ideal world, I think we should have a fast parser for ByteString which support both binary's getWordXX and ascii textual content, and a fast parser specialized for Text, let me know what's your thoughts!
> 在 2016年10月12日，上午5:38，Ben Gamari <ben at smart-cactus.org> 写道：
> "韩冬(基础平台部)" <handongwinter at didichuxing.com> writes:
>> Hi all,
>> I am happy to announce binary-parsers. A ByteString parsing library
>> built on binary. I borrowed lots of design/tests/document from
>> attoparsec so that i can build its shape very quickly, thank you bos!
>> And thanks to binary's excellent design, the codebase is very
>> small(<500 loc).
> What in particular changed to produce these performance improvements?
> I have been maintaining attoparsec recently and would be happy to merge
> any semantics-preserving changes or new combinators that would help
> existing users benefit from your work.
> - Ben
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> Only members subscribed via the mailman list are allowed to post.
More information about the Haskell-Cafe