In my code I have a map that is used heavily, several thousand times in a few seconds. Originally I had a TreeMap, but when testing with 9,000 entries I watched my old processor melt. And this needs to scale. So I moved to a HashMap and performance was excellent.
Now I am changing my design and am looking for a MultiMap. However I'm afraid of the performance impact on the get()
side, as it must iterate over said large map picking out the matching keys, and when called many many times even synchronized it seems like it would be slow.
Is there a good MultiMap that can handle such large values with great performance? Performance is critical in this application, as there could be many large separate maps handling a very large workload, making "small" performance losses very big issues.
Bonus points if it can be extracted to work alone without any dependencies.