Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hashtable and Hashmap Performance comparison  RSS feed

 
Srikanth Ramu
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hastable is synchronized and Hashmap is not, hence I guess Hastable will have some performance degradation. However below testing contradicts my understanding.



In the above code Hashtable performs better when compared with Hashmap. Am I missing some thing here.
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a discussion on this.
Just search the forums before posting a new topic.
 
Srikanth Ramu
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Nitesh for the link I'll look into it and I do search before posting and did not find this post in my search - Just an info.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!