On Thu, Jan 14, 2010 at 11:38 PM, Bryan O'Sullivan <b...@serpentine.com> wrote:
> On Thu, Jan 14, 2010 at 2:30 PM, Peter Simons <sim...@cryp.to> wrote:
>>
>> I just updated to GHC 6.12.1, and I noticed a significant drop in I/O
>> performance that I can't explain.
>
> This is probably brought about by the new Unicode I/O support in 6.12. Your
> file isn't open in binary mode, so it's probably getting translated from
> something like UTF-8 before it reaches you. Might want to compare the two.
> I'm a little surprised by the magnitude of the difference; I might have
> expected it to be 33%, not 400%.
>
Hold on, he's using hGetBuf/hPutBuf.

Although I'd suggest wrapping that in bytestrings.. the point is,
those functions are documented to ignore encoding and always use
binary I/O. There shouldn't be a difference at all.

I wonder if the difference goes away if the handle is explicitly set
to binary? It shouldn't, but then again it shouldn't exist in the
first place.

-- 
Svein Ove Aas
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to