Some where Some how, I found code similer to following code
Then I thought better way to write it is as following
and ofcourse the performace improved to about 25%... all went well till this question struck me, WHY
???
even in second case JVM will iterate hm (hashmap) to find the key so why so much of difference in performance ?
-P