classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: An interessting change for shared char[] in String/StringBuffer


From: Thomas Zander
Subject: Re: An interessting change for shared char[] in String/StringBuffer
Date: Thu, 8 Apr 2004 11:04:08 +0200
User-agent: KMail/1.6.1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 08 April 2004 01:24, Artur Biesiadowski wrote:
> Tom Tromey wrote:
> >>>From http://java.sun.com/j2se/1.5.0/jcp/beta1/index.html#java.lang:
> >>>"In this release, the sharing between String and StringBuffer has
> >>> been eliminated."
> >>>Does this mean to change to change the implementation in Classpath
> >>> too? I like this optimization...
> >
> > I don't think we necessarily have to change this.  IMO it would depend
> > on whether the change is observable by user code.  Our implementation
> > doesn't always share, anyway.  It only shares if the buffer is mostly
> > in use.
>
> 'Observable by user code' is very broad term. It is possible to write a
> short program which will throw OutOfMemoryException with sharing on and
> work without problems when data is always copied - does it counts as
> observation from user code ?

No, I don't think so.
If the only difference (as I understand from Tom's email) is
faster/effecient implementation then copying behavior from Sus JVM is not
needed in the first place.
Waiting for the 1.5 release and seeing if this proved too unstable for the
Sun JVM gives you a good indication weather this feature is a nice
advancement in Classpath..

Just my 2 cents.
- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAdRWJCojCW6H2z/QRAt2aAKClbQqTWl8NU5rjZDH08JzXVvj/ywCeJkZn
X3IMy1RwPHMrHs3oXh0J+Sc=
=1AOO
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]