Robert

77%
Flag icon
Besides offering excellent concurrency, ConcurrentHashMap is very fast. On my machine, the intern method above is over six times faster than String.intern (but keep in mind that String.intern must employ some strategy to keep from leaking memory in a long-lived application).
Robert
Yea, comparing to String.intern isn't that helpful. Would have been more helpful to compare with synchornizedMap and even regular HashMap.
Effective Java
Rate this book
Clear rating
Open Preview