
18 Jun
2012
18 Jun
'12
11:13 p.m.
On Mon, Jun 18, 2012 at 4:09 PM, Roman Leshchinskiy
ForeignPtrs can be unpacked, just not manually (which is a GHC bug, IMO, I should report it):
data Vector a = Vector {-# UNPACK #-} !Int {-# UNPACK #-} !(ForeignPtr a)
ByteString just has some room for optimisation here ;-)
I probably just remembered the ByteString optimization incorrectly. My apologies. I think the Addr# field was moved to the top of ForeignPtr (not to the PS constructor itself) to support unpacking. -- Johan