Haskell performance

Ketil Malde ketil+haskell at ii.uib.no
Thu Mar 18 15:43:21 EST 2004


"Simon Marlow" <simonmar at microsoft.com> writes:

>>> http://www.haskell.org/~simonmar/io/System.IO.html

> The difference is that the System.IO that comes with GHC is actually
> implemented, rather than just documented :-)

Ah.  Drat.  You know, it really looks good, and I really could use
efficient file access, but I'm afraid I really need an implementation,
too. :-)

> (to clarify, that link above is a half-baked design for a System.IO
> replacement.  The discussion was taking place on libraries at haskell.org a
> while back, but has stalled).

Okay.  What's really bothering me is that I can't find any good
indication of what to do to get IO faster.  Do I need to FFI the whole
thing and have a C library give me large chunks?  Or can I get by with
hGet/PutArray?  If so, what sizes should they be?  Should I use memory
mapped files?

I'm willing to put in some work, accept some kluges, and so on, but I
can't really blindly try all possible combinations with my fingers
crossed.  Some people seem to manage to speed things up, but I can't
seem to find anything *specific* anywhere.

E.g. when I posted a snippet to do readFile¹ in somewhat larger chunks
a while ago, I was hoping somebody would say, hey, that's just stupid,
what you need to do instead is... or point me to TFM, but
unfortunately only silence ensued, and left me a sadder but none the
wiser man... 

-kzm

¹ Message-ID: <egllmr9rsi.fsf at sefirot.ii.uib.no>, on
haskell at haskell.org 
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Glasgow-haskell-users mailing list