We have ht_xx_as_iter and ht_xx_as_iter_keys, but not ht_xx_as_iter_kv.
There are situations though in which we need both, the value and the key.
Currently, this means iterating over the keys and use ht_xx_find to get the value.
This is inefficient, because the find() call is O(n).
Having an ht_xx_as_iter_kv would be rather nice for these cases.
We have
ht_xx_as_iterandht_xx_as_iter_keys, but notht_xx_as_iter_kv.There are situations though in which we need both, the value and the key.
Currently, this means iterating over the keys and use
ht_xx_findto get the value.This is inefficient, because the
find()call isO(n).Having an
ht_xx_as_iter_kvwould be rather nice for these cases.