ByteArray# can be passed to C functions as well. The only problem is
with mmap which cann't be implemented with arrays. mmap returns a
pointer to the mapped file which is outside the Haskell heap.

Cheers,
  Krasimir

2005/10/18, Benjamin Franksen <[EMAIL PROTECTED]>:
> On Tuesday 18 October 2005 11:07, Krasimir Angelov wrote:
> > I am curious why FPS is implemented on top of ForeignPtr. ByteArray#
> > based implementation should be faster and more space efficient.
>
> I think the reason is C compatibility. A number of functions in FPS use
> ffi-bound C code (mmap, gz (de-)compression,...).
>
> Ben
> _______________________________________________
> Haskell-Cafe mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to