I noticed that in the benchmarks for http-req, the inClass function from attoparsec is used. However, the equivant binary-parsers code writes the predicate by hand. Attoparsec's documentation warns against using inClass in the [Performance Considerations] section. To make this benchmark reflect attoparsec's performance more accurately, I think that isHeaderChar should become a top level function that is called by both attoparsec code and by binary-parsers code.
Ah, that code is copied from attoparsec and when write other benchmarks I just use comparison for simplicity, it is indeed an unfair bench, could you send me a patch with result?
I noticed that in the benchmarks for
http-req
, theinClass
function fromattoparsec
is used. However, the equivantbinary-parsers
code writes the predicate by hand. Attoparsec's documentation warns against usinginClass
in the [Performance Considerations] section. To make this benchmark reflect attoparsec's performance more accurately, I think that isHeaderChar should become a top level function that is called by both attoparsec code and by binary-parsers code.