aspose file tools*
The moose likes Performance and the fly likes Performance => HashMap or ConcurrentHashMap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "Performance => HashMap or ConcurrentHashMap" Watch "Performance => HashMap or ConcurrentHashMap" New topic
Author

Performance => HashMap or ConcurrentHashMap

SatishXYZ Kumar
Greenhorn

Joined: Mar 31, 2008
Posts: 2
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

Joined: May 18, 2007
Posts: 341

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

Joined: May 18, 2007
Posts: 341

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

Joined: Mar 31, 2008
Posts: 2
I tried to follow javaranch's official rule, but there are more users having same name

Satish Kumar
Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

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

Joined: Dec 11, 2004
Posts: 13410

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


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Performance => HashMap or ConcurrentHashMap