Immutable CStrings

Simon Marlow
Thu, 24 Apr 2003 09:58:47 +0100

> Other options may exist using packed string objects, pinning them in
> the GHC heap, etc. but they are not portable and probably not much
> more efficient. =20

If you use mallocForeignPtr and don't need finalizers, then I agree -
the ForeignPtr method is about as efficient as PackedStrings.  But if
you need finalizers and real ForeignPtrs then it will be significantly
less efficient in GHC.  I guess it depends on whether the reference
count is important for George's application.