[Haskell-cafe] ST not strict enough?
Jason Dusek
jason.dusek at gmail.com
Fri Nov 18 06:14:46 CET 2011
2011/11/16 Tristan Ravitch <travitch at cs.wisc.edu>:
> Have you tried building the vector using things besides
> write/ST? It might be a bit faster to use something like
> Vector.unfoldr or Vector.generateM and ByteString.index to
> build up a pure Vector. After that you could use
> Vector.unsafeThaw to convert that pure Vector into an MVector.
I tried unfoldrN and, indeed, the memory usage has gone down.
Residency seems to be <45K, regardless of input size; and the
productivity is above 90% even for small (128K) inputs. Thanks
for your suggestion.
--
Jason Dusek
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
More information about the Haskell-Cafe
mailing list