Haskell Platform proposal: Add the vector package
Johan Tibell
johan.tibell at gmail.com
Tue Jun 19 01:13:52 CEST 2012
On Mon, Jun 18, 2012 at 4:09 PM, Roman Leshchinskiy <rl at cse.unsw.edu.au> wrote:
> 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
More information about the Libraries
mailing list