Thanks for the suggestions. I tried to add strictness in the following ways:
On Tue, Aug 23, 2011 at 10:04 PM, Andreas Voellmy
<andreas.voellmy@gmail.com> wrote:
> data DAT = DAT (IOArray Int32 Char)Try to make this a newtype instead. The data type adds a level of indirection.
You most likely want (insertDAT a j $! c) to make sure that the
> do let p j c = insertDAT a j c >> lookupDAT a j >>= \v -> v `pseq` return
> ()
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