On Sat, 5 Jul 2003, Leopold Toetsch wrote:

> This is a first attempt to iterate over hashes.
> The hash is scanned linearly, until the given integer index is found.
>
> Is there a better way to locate the next entry, either by an integer idx
> or by a key or some other means?

It's constant time if you keep a bucket index and a pointer to the
current hash bucket in the iterator (see e.g. hash.c:hash_clone()).

/s

Reply via email to