Faster IO

Benedikt Huber benjovi at gmx.net
Thu Jun 23 17:06:40 EDT 2005


Jim Apple wrote:
> I'm having an IO speed problem. I need to input a long string of known
> length and process it with a foldl. getLine and foldl take way too long;
> is there a known faster way?

Use hGetContents and fold', the strict version of fold (It then takes
about 70 seconds to sum 18 megs of float numbers on my machine, linear
cost).

benedikt



More information about the Glasgow-haskell-users mailing list