[Haskell-cafe] some newbie FFI questions

MR K P SCHUPKE k.schupke at imperial.ac.uk
Thu Jul 1 07:30:36 EDT 2004

If you are using GHC the fastest way I know to do this
is to build the array using a mutable-unboxed array in the
state-monad. Then freeze the array and return an
unboxed immutable array. This is a lot faster than
building the array by copying (every time you set a
value in an immutable array the whole array much be
copied - for a sizeable image this is quite a lot of


More information about the Haskell-Cafe mailing list