On Mon, 29 Dec 2003 09:27, Matt Fowles wrote;

  > Why not just have the hash value be an integer, then each register
  > increments it and each unregister decrements it.  With the entry
  > getting removed if it hits 0.

Apologies for spamming the thread with mention of Set::Object again :)

But if the hash structure looks anything like Set::Object's internal
structure, you don't *need* values in the `hash' at all.  Sheer
presence or absence of the reference address (ie, the hash key) in the
hash bucket is enough.  It just depends whether or not you really need
to refcount the entries.  That way, you can get away with just an
array of pointers for your hash buckets and hence they're nice and
small.

If you need to count just references, it's an array of (pointer, int)
- or one array of pointers, one array of ints (latter maybe slightly
better for cache pipelines etc).

Presumably this all means that Parrot will be able to due ruby-esque
iteration over all objects (if I may use the term PMC to refer to an
object ;-)) that have been created?
-- 
Sam Vilain, [EMAIL PROTECTED]

  The meek shall inherit the earth, but not its mineral rights.
J PAUL GETTY


Reply via email to