Quoth Johan Tibell <johan.tib...@gmail.com>, ... > Could you try using the Data.ByteString API. I don't have the code in > front of me so I don't know if the System.Posix API uses Strings. If > it does, that's most likely the issue.
It does, but it can also read directly to Ptr Word8 (fdReadBuf), which you'd think would be closer to hardware speed - but then you might lose the advantage trying to peek the data out of the buffer. In principle you ought to be able to stuff that pointer right into a ByteString, but don't know for sure that there's any public API for such. I guess you may be proposing to use Data.ByteString.hGet? Look out for character set conversions! Even if String were affordable in terms of resources, I'm not sure there's any way to avoid this problem. Donn _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users