On Tue, Feb 09, 2010 at 04:27:57PM -0800, Bryan O'Sullivan wrote: > 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.
He thought the vector would be fused away by the library, which is one of the selling points of uvector. Sadly the implementation of uniformArray wasn't done with this purpose in mind. -- Felipe. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe