Quantcast
Channel: BlogoSfera » looks
Viewing all articles
Browse latest Browse all 14

Does HashMap.keySet() always get recomputed?

$
0
0

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.


Viewing all articles
Browse latest Browse all 14

Trending Articles