On 11/9/06, Karl Fogel <kfogel red-bean.com> wrote:
> On 11/9/06, Jim Blandy <jimb red-bean.com> wrote:
> > To add an entry to the off-to-the-side list, just
stick the new
> > key/value pair at the end. To remove an entry
from the
> > off-to-the-side list, you copy the key/value pair
at the end of the
> > list into the entry you're vacating, decrement the
length of the list,
> > and update its hash entry.
> >
> > Iterators can be simple indexes into the
off-to-the-side list.
>
> Hunh. The off-to-the-side list is just used for
iterating, right?
> That is, you don't look at it when doing a standard
hash lookup?
You do use it for ordinary hash lookups. The hash array no
longer
contains pointers to anything: it just holds indices into
the
off-to-the-side list. Keys and values only appear in the
off-to-the-side list.
_______________________________________________
Minor mailing list
Minor red-bean.com
http:/
/www.red-bean.com/mailman/listinfo/minor
|