If you need a synchonized map, and dont need nulls permitted, and you
already use Hashtable.. Why would you change?

A synchronized Map can be obtained from the Collections API by using the
java.util.Collections.synchronizedMap(Map) method.

Does Shirazi say why a java.util.Hashtable is faster than a
java.util.Collections.SynchronizedMap?

-----Original Message-----
From: Jose Antonio Lamas <[EMAIL PROTECTED]>
To: Greg Munt <[EMAIL PROTECTED]>; Ross Burton <[EMAIL PROTECTED]>
Cc: Advanced-Swing <[EMAIL PROTECTED]>
Date: Tuesday, July 24, 2001 12:40
Subject: RE: Array, Vector or Hashtable to keep the table's data model ?


>Hi again,
>you suggest migrating Hashtable to Hashmap, but in order to increase
>perfomance that is not very good. As I have read in Jack Shirazi's "Java
>performance tuning", a synchronized Hashmap is slower than a Hashtable
>(which is synchronized). Will the data access improve? I don't think so.
>
>Excerpt of the Java 1.2.2 API: "The HashMap class is roughly equivalent to
>Hashtable, except that it is unsynchronized and permits nulls.".
>
>May I migrate to Hashmap or maintain Hashtable? Suppose I write new code,
>and I need a synchronized Map.
>
>Regards
>
>_______________________________________________
>Advanced-swing mailing list
>[EMAIL PROTECTED]
>http://eos.dk/mailman/listinfo/advanced-swing

_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to