[Guido]
> Wouldn't attempting to reuse DUMMY entries be expensive? You'd have to
> search forward in the array. Just keeping a count of DUMMY entries and
> compacting when there are too many seems better somehow.

I haven't looked at the code, but presumably one of the members of a
DUMMY key/value struct could be (ab)used to hold the index of "the
next" DUMMY (i.e., treating DUMMYs as a stack implemented by a
singly-linked list).  In which case no search is needed, but the dict
would need a word to hold the index of the DUMMY stack top (or, e.g.,
-1 when no DUMMY exists) - or dedicate "the first" key/value slot to
holding the stack top - or ...

It's just code, so it can do anything ;-)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to