I am writing a simulation program where speed is crucial. From an OO design perspective, it makes most sense for me to use HashMaps whose keys are enum values in my model objects.
I will be doing millions of operations on these HashMaps, looping over them many times, and doing lookups on them, including retrieving lists of keys whose value is equal to some specified value.
My question is this: Should I go ahead and use HashMaps, or should I consider using arrays, or some other structure, because they will be faster for these looping and lookup operations?
Thanks for any ideas. I can give further details on what I'm doing if necessary.