Re: JavaMemoryModel: Summary of useless sync

From: Bill Pugh (pugh@cs.umd.edu)
Date: Mon Nov 15 1999 - 09:31:40 EST


>
>
> > String 688,315 0.8%
>
>i don't understand why string is on that list though. string is
>immutable, and requires no synchronization, no?
>
>david

My statistics where in which class the synchronization was performed.
The constructor for Strings that takes a StringBuffer synchronizes on
the StringBuffer; that accounts for the 688315 syncs recorded.

        Bill

-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:23 EDT