Hi all,

My intuition tells me that the code in

http://urchin.earth.li/~ian/Mem.hs

should have the same space usage regardless of whether USESMEM is
defined. However, when compiling with

    ghc -Wall -O2 -cpp           --make Mem -o mem

and running

    ./mem True 100000 > /dev/null

it runs in constant space but compiling with

    ghc -Wall -O2 -cpp -DUSESMEM --make Mem -o mem

and running in the same way it increases up to >100M.

Is this an instance of GHC not being as smart as it could?

Or is it a case in which I need to give it additional strictness
annotations in order to get it to run in constant space (and if so,
what annotations would be best?)?


Thanks
Ian

_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to