[Haskell-cafe] Data.Judy and StablePtr

Diego Souza dsouza at bitforest.org
Mon Dec 20 17:06:06 CET 2010

Hello Haskellers,

I'm playing a bit with Data.Judy. However, I noticed that using StablePtr
incurs in some performance problems, I don't have any numbers but as a
example use Int and ByteString as values and you can notice the difference
without any benchmarking tool with the example that comes in the

The question that I have is: is there any way to make it faster for types
other than those that fits in word size? I understand that the way the
binding to the C code has been done, stableptr is required. Am I wrong
assuming this? I would be happy to submit a patch but I failed to find a way
to improve the performance.

The second question is what is a common practice to avoid memory leaks with
StablePtr? I have zero experience programming with the Haskell FFI
interface, so probably the most basic stuff would help me a lot in this

Thanks in advance,
yahoo!im: paravinicius
gpg key fingerprint: 71B8 CE21 3A6E F894 5B1B  9ECE F88E 067F E891 651E
gpg pub key: http://bitforest.org/~dsouza/pub/gpg-pubkey.txt
authorized_keys: http://bitforest.org/~dsouza/pub/authorized_keys.txt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20101220/4839a65c/attachment.htm>

More information about the Haskell-Cafe mailing list