[Haskell-cafe] Re: Processing of large files
Simon Marlow
simonmar at microsoft.com
Mon Nov 8 17:05:30 EST 2004
John Goerzen writes:
> Yes it does. If you don't set block buffering, GHC will call
> read() separately for *every* single character. (I've
> straced stuff!) This is a huge performance penalty for large
> files. It's a lot more efficient if you set block buffering
> in your input, even if you are using interact and lines or
> words to process it.
That shouldn't be the case. GHC's IO library checks whether a Handle
refers to a TTY, and enables line buffering if it does. Otherwise,
block buffering is the default.
Could you isolate the test case and submit a bug report?
Cheers,
Simon
More information about the Haskell-Cafe
mailing list