boxed FastTypes
Isaac Dupree
isaacdupree at charter.net
Thu Jan 3 07:07:56 EST 2008
while it isn't really relevant to the ghc porting work itself...
For compilers in which FastInt = Int, _there is less strictness_ because
of special treatment of unboxed types. Therefore it may be slower or
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
(why not - it could help some compilers without doing much harm nor
extensions - though it's getting ugly)
-Isaac
More information about the Cvs-ghc
mailing list