I happen to need to use some kind of
Map to store just a few elements/key-value pairs. Moreover, the keys are basically simple numbers, or analogously simple types.
I did that by using
HashMaps but I suspect I am incurring in a lot of memory/cpu overhead (because I need many such small sets), and generally over-complicating something very simple. I would probably be fine just using a
Vec and its various
find methods. Though, this is wrong in principle: I need a set, not a stack (for example, I don’t want repetitions). What could be done is providing a simple wrapper around
Vec to turn it into a set or map.
Would it be a good idea to have a crate providing
SimpleMap as described above? Is there already such a crate?