[Haskell-cafe] Speed of character reading in Haskell

Bulat Ziganshin bulat.ziganshin at gmail.com
Mon Sep 10 02:34:04 EDT 2007


Hello ok,

Monday, September 10, 2007, 6:09:27 AM, you wrote:

>> Locks: getChar has to acquire locks, as does getContents. However,
>> because getContents can operate on blocks, this requires many fewer
>> locks.

> What's to lock against? I'm writing single-threaded code.

unfortunately, there is one common code which used for any i/o. you
may look at http://haskell.org/haskellwiki/Library/Streams
which allows to disable locking and thus provides very fast getChar
implementation 

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list