[Haskell-cafe] Efficient string output

Ketil Malde ketil at malde.org
Mon Feb 9 09:47:08 EST 2009


Duncan Coutts <duncan.coutts at worc.ox.ac.uk> writes:

> Have you considered using Data.Binary to output the data too? It has a
> pretty efficient underlying monoid for accumulating output data in a
> buffer. You'd want some wrapper functions over the top to make it a bit
> nicer for your use case, but it should work and should be quick.

I've used Data.Binary.Builder to generate the output, which is quite
nice as an interface.  Currently, I've managed to shave off a few
percent off the time - nothing radical yet, but there's a lot of room
for tuning various convenience functions in there.

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Haskell-Cafe mailing list