[Haskell-cafe] Preferred way to get data from a socket

Donald Bruce Stewart dons at cse.unsw.edu.au
Wed Jun 27 03:40:28 EDT 2007


bulat.ziganshin:
> Hello Donald,
> 
> Wednesday, June 27, 2007, 6:37:07 AM, you wrote:
> 
> >> I also know Bulat Ziganshin had put together a nice-looking Streams
> >> library (http://unix.freshmeat.net/projects/streams/) based on John
> >> Goerzen's previous HVIO work, but I wasn't sure if the ByteString
> >> stuff matches the speed and encapsulates all of the functionality of
> >> that anyway. Or can/should they be used together somehow?
> 
> > Should be similar in speed, and most high-perf stuff seems to use
> > ByteStrings now. ByteStrings also have some nice high level
> > optimisations not available to lower level libraries.
> 
> i recommend you to try ByteString own i/o capabilities at first. if it
> will not satisfy you, you can try Streams 0.2 which supports
> ByteString i/o:
> 
> http://www.haskell.org/library/StreamsBeta.tar.gz
> 
> using my library should allow 30-50 mb/s i/o speed but its
> installation may be tricky since it was not updated over a year

That's interesting, Bulat. Two points I'd like to ask about the streams library:

What machine did you do the IO benchmarks on? Since we get well over 10x
that speed word writing in Data.Binary now, for example, on a fast
machine. (Duncan, what's the max throughput we've seen?)

And secondly, will the streams stuff be updated? I had trouble
benchmarking against it back in January, and am wondering if it will be
maintained?

-- Don


More information about the Haskell-Cafe mailing list