snoyberg/conduit — pull request #104 by rycee (2013-07-11 17:51:33+00:00)
Title: [attoparsec-conduit] More speedup

Sorry, I wasn't planning to do more on attoparsec-conduit but while profiling the library I'm making I happened to think that GHC should be able to optimize `conduitParse` (in particular the calculation of line and column) better if it knew whether it was working with `Text` or `ByteString`. So I tried to add `SPECIALIZE` pragmas, which unfortunately didn't do much. When I also asked GHC to inline `sinkParserPos` and `sinkParserPosErr`, however, I got another nice ~20% speedup on the criterion benchmark I've used in the other pull requests. The compiled size doesn't seem to blow up very much since the specialization is limited to two cases.

(I also fixed the nagging compilation warnings GHC gives)