Is there a way to allow duplicate keys with different values in std.HashMap or std.ArrayHashMap and get an iterator to those values in O(1)? I'd like to avoid the overhead of ArrayList since my duplicate distribution is heavily weighted towards 0.
Right now the only way I see is to hash the string key AND value to insert duplicates. But then using getCtx with will fetch duplicates in O(n) rather than my desired O(1).
I'd like to avoid implementing my own hash map with chaining...