classpath-patches
[Top][All Lists]
Advanced

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

Re: [cp-patches] Patch: use StringBuilder for reading/writing property f


From: Andrew John Hughes
Subject: Re: [cp-patches] Patch: use StringBuilder for reading/writing property files
Date: Wed, 26 Oct 2005 22:34:13 +0100

On Wed, 2005-10-19 at 12:24 -0700, Anthony Green wrote:
> Synchronization often shows up near the very top of gcj-compiled
> benchmarks.  It turns out that, for benchmarks I've run, ~50% of the
> synchronization calls come from reading property files with
> StringBuffer.  This should all go away if we use StringBuilder instead.
....

On a related note, there does seem to be a lot of internal use of Vector
within Classpath.  Are these all cases where synchronization is of use?
I think its safe to say that occurrences purely within a single method
e.g.

public void doStuff()
{
        Vector x = new Vector();
        ...do stuff...
}

aren't going to run into race conditions, and could be changed to a more
efficient structure.

Just a thought,
-- 
Andrew :)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint)
attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

"Value your freedom, or you will lose it, teaches history.
`Don't bother us with politics' respond those who don't want to learn."
-- Richard Stallman

Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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