The line-based operations, like those in Data.Text.IO, use the system encoding (and T.hGetLine, T.hPutLine etc.) and thus are slower than the 'official' route, which would use the very fast bytestring IO operations from Pipes.ByteString and the encoding and decoding functions in Pipes.Text.Encoding, which are also quite fast thanks to the streaming-commons package.
I'm curious: why is using the system encoding slower?
Re: Question about using the system encoding in Pipes.Prelude.Text
I never looked into why, but you can observe that e.g. `fmap (decodeUtf8) . B.readFile` is several times as fast as `T.readFile` . It's the same with the other material in `Data.Text.(Lazy.)IO`. I think this is why he doesn't include the IO functions in `Data.Text`: the official IO is via ByteString using the encoding and decoding functions, same as with pipes-text