• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Performance => HashMap or ConcurrentHashMap

 
SatishXYZ Kumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a HashMap that has a little more than 150000 entries. After initialization it has no put operation. There are 30-40 threads that have very high volume of get() operation on this HashMap.

Now I want to know if replacing this HasMap with a ConcurrentHashMap will add anything to the performaance or not? I mean whose searching mechanism is better?
 
Anubhav Anand
Ranch Hand
Posts: 341
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SatishXYZ Kumar,
Welcome to JavaRanch.

Please look carefully at official naming policy at JavaRanch. Please adhere to official naming policy & help maintain the decorum of the forum.
 
Anubhav Anand
Ranch Hand
Posts: 341
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well there have been a number of discussions on the forum about HashMaps and Concurrent HashMaps. You can see this thread and aslo this another thread.

Also, you may like to view this Terracotta blog.
 
SatishXYZ Kumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to follow javaranch's official rule, but there are more users having same name

Satish Kumar
 
Anubhav Anand
Ranch Hand
Posts: 341
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by SatishXYZ Kumar:
I tried to follow javaranch's official rule, but there are more users having same name

Satish Kumar


Please try to make it as real as possible. You may use your middle name or may use shortname for first name. We are a friendly forum and naming policy helps to maintain the decorum of the forum.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by SatishXYZ Kumar:
I tried to follow javaranch's official rule, but there are more users having same name

Satish Kumar



"SatishXYZ Kumar",
You should be able to fix your screen name by adding a middle initial.



Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. You can change it here
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic