hPutStr NoBuffer uses base hPutChar for Every Character
BebeSparkelSparkel opened this issue · comments
I was looking at creating a PR for #446 and noticed that for strict text hPutStr the base function GHC.IO.Handle.Text.hPutChar which has a lot of overhead and repeats much work for every character that Data.Text.IO.hPutStr has already done. Is this something that could be improved upon?
This also seems to be the case with lazy text hPutStr except that it repeats work for every chunk instead of every char.
NoBuffering
mode is meant to be slow. It does not bear much practical significance, because compiled code uses LineBuffering
by default.
I see that now in ghc-internal
hPutChars handle str -- v. slow, but we don't care