[Haskell-cafe] Generate random UArray in constant memory space.

Bryan O'Sullivan bos at serpentine.com
Tue Feb 9 19:27:57 EST 2010

On Tue, Feb 9, 2010 at 3:48 PM, Vasyl Pasternak
<vasyl.pasternak at gmail.com>wrote:

> mwc-random is really fast. But it eats to much memory.

It creates and returns a vector, so if you ask it to give you a billion
items, it's going to require north of 8 gigabytes of memory. This should not
come as a surprise, I'd hope :-)  Assuming that's not what you actually
want, you should look at other entry points in the API, which you can use to
generate a single value at a time in constant space.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100209/677ddffd/attachment.html

More information about the Haskell-Cafe mailing list