Hi All,

Thanks for the information + various ideas.
The various suggest constructs provide a helpful view on different corners
of the language, but all appear to have the characteristic of throwing out
the existing hashtable structure from the map and then reconstructing it
from scratch for the new set (which is fine in a big-O sense, but feels
like it can be improved upon in principle).

Responding specifically to Stephen:

> I don't know of a more efficient way to convert, but depending on what
> operations you want, you might be able to compute it directly on the
> hash, e.g., see hash-has-key?, hash-keys-subset?, hash-union, etc. (I
> didnt know about some of the functions until recently.)
>

I agree that if I just needed to query an existing notional set, this would
be a good approach without having to copy at all.
Unfortunately, I need to be able to update the set over time without
modifying the original map, and maintaining a second map when I only need
the keys seems even more wasteful than the intermediate conversion to list.

Best,
~Thomas

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CA%2BHWosUDPW4bfWCH84zC-%2B_YtX67eJ%3DO1Th57qUFqTN0afPvkQ%40mail.gmail.com.

Reply via email to