List Info

Thread: hash table iteration




hash table iteration
user name
2006-11-09 07:21:10
On 11/8/06, Jim Blandy <jimbred-bean.com> wrote:
> I realized there was a huge gaping problem in my
existing hash table
> code: it was impossible to implement any sort of
iteration interface
> at all.  A GC could occur at any time and reshuffle the
table
> arbitrarily, invalidating any existing iterators.  A
'for_each' style
> interface like the one for environments is no better. 
Oops.
>
> I've got a new hash table design, though, that should
fix this, save
> memory over the current design, and make it easy to
provide a special
> case for hash tables with few entries, if that becomes
desireable.
>
> First, I'm going to implement the interface I've got
now (plus Karl's
> suggested improvements), then I'm going to write a test
which catches
> the GC-related failure,

IOW, see the test fail...

> and then I'm going to re-do the hash table
> implementation in the newer, smaller, iterate-able way.

...and then see it succeed?  (I thought that was what you
meant,
just checking.)

_______________________________________________
Minor mailing list
Minorred-bean.com
http:/
/www.red-bean.com/mailman/listinfo/minor
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )