
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? Jim

I wrote something a while back to do this more quickly: http://montev.isi.edu:8000/hdaume/download.pl?request=haskell/FastIO.tar.gz I'm not sure if it still works or not with the latest GHC, but it shouldn't be too hard to migrate it up. - Hal On Thu, 23 Jun 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?
Jim
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
-- Hal Daume III | hdaume@isi.edu "Arrest this man, he talks in maths." | www.isi.edu/~hdaume

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

Hello Jim, Friday, June 24, 2005, 12:12:41 AM, you wrote: JA> I'm having an IO speed problem. I need to input a long string of known JA> length and process it with a foldl. getLine and foldl take way too long; JA> is there a known faster way? afaik, BlockIO library are created just for such cases http://cryp.to/blockio/blockio-2004-10-10.tar.gz -- Best regards, Bulat mailto:bulatz@HotPOP.com
participants (4)
-
Benedikt Huber
-
Bulat Ziganshin
-
Hal Daume III
-
Jim Apple