To answer Manik's question for him, I ran some tests in JBCache and the performance
for a plain synchronized HashSet compared to CopyOnWriteArraySet was worse, by about
10-20%. This is on a dual-core laptop, and probably for a four or eight-way, the
difference might be more noticeable.
COWAL actually does have some heavy synchronization for add and remove in JDK 1.5. For JDK
1.6, a read-write lock is used. (not sure this would help., as every operation done is a
add or remove.) COWAL is more designed for more readers than writers.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069904#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...