On Thu, Jan 03, 2008 at 07:07:56AM -0500, Isaac Dupree wrote:
> 
> even have memory leaks.  To partially remedy this, What if in data types 
> everywhere
> data Foo = Foo FastInt
> becomes
> data Foo = Foo !FastInt
> (the strictness annotation simply has no additional effect when FastInt 
> = Int# )
> or even
> data Foo = Foo {-#UNPACK#-}!FastInt

Once this is done, it may be possible to go even further: If modern GHC
can optimise code using Int to the same code that we would get if we
used Int#, then it would be nice to de-hash as much of GHC's code as
possible, and use the standard (+), (>) etc.

We might need to give it a little help, e.g. using STRICT(x) in the odd
pattern, where:

#if __GLASGOW_HASKELL__ >= 608
#define STRICT(x) !(x)
#else
#define STRICT(x) (x)
#endif


Thanks
Ian

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to