Stable name equality

David Feuer david.feuer at gmail.com
Tue Aug 21 07:09:16 UTC 2018


I had another thought. If we want, I believe we can make the stable name
mechanism considerably more compact by giving up on a flat array
representation for the stable name table. The flat representation means
that enlarging the table moves all its entries. Suppose we instead choose
some shallow tree representation that can grow without moving (an array of
arrays comes to mind, where each array is null or twice the size of the
last; index calculations should be pretty simple). I believe we can then
play some nice tricks:

1. Lay out each entry in the stable name table like a heap object.
2. Make each StableName# a pointer directly to its stable name table entry.

So instead of a stable name object and a stable name table entry that
points to it, we'd just have the stable name entry. I believe we could run
the free list through the "heap object" headers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20180821/555ee8e6/attachment.html>


More information about the ghc-devs mailing list