[Haskell-cafe] Lazy lists simulated by unboxed mutable arrays

Don Stewart dons at galois.com
Wed May 28 16:41:04 EDT 2008

> Hello Andrew,
> Wednesday, May 28, 2008, 10:37:47 PM, you wrote:
> >> looks like lazy.bytestring generalized to any a
> > That sounds like a darn useful thing to have...
> well, support on only Word8 as base type isn't some fundamental limit,
> just creators of bytestring package was not very interested in support
> of other base types 
> > [OTOH, currently unboxed arrays are available only for a select few 
> > types, so good luck implementing this in a clean way!]
> a few years ago, storable array was slower than special primitives
> created for UArray implementation. now they should have equal
> performance, so it's possible to make UArray implementation that will
> work with any Storable type. Simon, can you please confirm or refute this?

Sure. I've been working on a general vector library based on a similar
type to STUArray, but pure, with a bytestring-like interface.


Generalised unlifted vectors. Performance looks rather good (typically
loops unfold into register variables). This is a restricted form of the
general data parallel arrays library.

-- Don

More information about the Haskell-Cafe mailing list