
23 Aug
2011
23 Aug
'11
4:38 p.m.
On Tue, Aug 23, 2011 at 10:04 PM, Andreas Voellmy
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