[Haskell-cafe] StablePtr overhead?

Don Stewart dons at galois.com
Tue Aug 10 20:12:58 EDT 2010


greg:
> Hi all,
> 
> Can anyone explain what the overhead of using StablePtrs is?
> Specifically I am interested in knowing the time/space complexity of the
> various Foreign.StablePtr operations and how many memory indirections
> are involved when using deRefStablePtr.

There's a hashtable in the runtime that maps pointers to stable
pointers. So you have that overhead. Create N StablePtrs, and get a
correspondingly large hashtable.


More information about the Haskell-Cafe mailing list