I’m trying to understand the performance characteristics of a method which makes several calls to keySet() in a loop (this is a single threaded application/no concurrency issues to worry about): for ( ... ) { aHashMap.keySet().contains(x); aHashMap.keySet().contains(y); } Generally speaking, the multiple calls might be noticed and optimized away by the compiler (so though it […]
The post Does HashMap.keySet() always get recomputed? appeared first on BlogoSfera.