On Tue, Aug 23, 2011 at 10:04 PM, Andreas Voellmy
<andreas.voel...@gmail.com> wrote:
> data DAT = DAT (IOArray Int32 Char)

Try to make this a newtype instead. The data type adds a level of indirection.

>   do let p j c = insertDAT a j c >> lookupDAT a j >>= \v -> v `pseq` return
> ()

You most likely want (insertDAT a j $! c) to make sure that the
element is force, to avoid thunks building up in the array.

> -- Parameters
> arraySize :: Int32

Int might work better than Int32. While they should behave the same on
32-bit machines Int might have a few more rewrite rules that makes it
optimize better.

-- Johan

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to