It has been reported that from Java JDK 1.3.1 to JDK 1.4.0
HashMap is 5 times slower (see
here).
What is the state of the art of HashMap at java 6?
Is recommendable to be used?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That bug is marked fixed in 1.4.0_02 and 1.4.1, so there probably isn’t any need to worry about its performance in Java 1.6.
(If you’re in a multithreaded environment, you probably want ConcurrrentHashMap.)