This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/JDWP] VMVirtualMachine StringBuffer cleanup


>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> Okay, I don't really see too much of a difference between
Keith> gnu.gcj.runtime.StringBuffer and java.lang.StringBuilder, so I opted
Keith> for the latter.

The difference is that StringBuilder has to make a copy of the char[]
data when toString is called.  Our StringBuffer shares the data, which
is more efficient.

However, this only makes a difference if you expect this code to be
run with some frequency.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]