[Haskell-cafe] Haskell vs GC'd imperative languages, threading, parallelizeability (is that a word? :-D )

Donald Bruce Stewart dons at cse.unsw.edu.au
Fri Aug 10 04:03:56 EDT 2007


hughperkins:
> 
>    On 8/10/07, Donald Bruce Stewart <[1]dons at cse.unsw.edu.au>
>    wrote:
> 
>      It's using bit arrays.
> 
>    Well I'm a total Haskell newbie, and you're using Haskell to
>    write imperative code, so it's really hard for me to read,
>    but looking at your code, you have: 
>
>       (IOUArray Int Bool) -- an array of Bool
> 
>    Bool is a 32-bit value in Haskell AFAIK?  (or possibly a
>    machine-dependent sized value, but certainly not a bit?)

No, STUArray s Int Bool is a bit array.
Look at the space use. Or try replacing Bool with Word32, and see what happens.

-- Don


More information about the Haskell-Cafe mailing list