|
Re: [Haskell] ANNOUNCE: FPS - FastPackedStrings 0.2: msg#00100lang.haskell.libraries
Donald Bruce Stewart wrote: bulat.ziganshin: 2. it uses ForeignPtr, that is slow in ghc 6.4 and require more Optimising the library for GHC 6.4.x isn't a goal (for me, at least). I'm convinced that ForeignPtr is the right choice. No other representation can give you all of these: - converting arbitrary Ptrs into PackedStrings without copying, including finalizers if necessary (useful for mmap()). - garbage-collectable PackedStrings can be allocated on the heap, no finalizer necessary - PackedStrings can be passed to foreign functions without copying ByteArray# only gives you the second two. You would need two variants of the representation to get all three, and that means extra overhead. Cheers, Simon |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: "FastPackedString" considered harmful: 00100, Simon Marlow |
|---|---|
| Next by Date: | Re: [Haskell] Re: ANNOUNCE: FPS - FastPackedStrings 0.2: 00100, Donald Bruce Stewart |
| Previous by Thread: | Re: [Haskell] ANNOUNCE: FPS - FastPackedStrings 0.2i: 00100, Donald Bruce Stewart |
| Next by Thread: | Re[2]: [Haskell] ANNOUNCE: FPS - FastPackedStrings 0.2: 00100, Bulat Ziganshin |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |