commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Feldhacker" <feldhacker.ch...@mchsi.com>
Subject Re: [lang] FastStringBuffer?
Date Fri, 08 Aug 2003 21:46:19 GMT
Thanks for the info -- I guess we can now say that it has been discussed!

Incidentally, I did do some playing/rough testing with my own
"FastStringBuffer" implementation.
Notwithstanding the extra allocation needed when calling toString(), making
the methods unsynchronized resulted in a ~7% performance gain.  If I also
removed the extra bounds-checking, the improvement was ~9%.  (Sun JRE 1.4.2)

Glad to see Sun thought of making the same improvement -- better late than
never!

----- Original Message ----- 
From: "Gary Gregory" <ggregory@seagullsw.com>
To: "'Jakarta Commons Developers List'" <commons-dev@jakarta.apache.org>
Sent: Thursday, August 07, 2003 4:49 PM
Subject: RE: [lang] FastStringBuffer?


FYI, Java 1.5 will include a fast string buffer.

From
http://developer.java.sun.com/developer/community/chat/JavaLive/2003/jl0729.
html:

"Laurence Vanhels: From profiling sessions, it's clear that any Java program
produces a huge number of String objects. Does the new release include any
new clever optimizations to speed up the general use of Strings?

Neal Gafter: Yes! String concatenation is fairly slow right now because
StringBuffer is fully synchronized. We're adding an unsynchronized version,
java.lang.StringBuilder, with the same functionality but not synchronized.
It will be used by the compiler to compile string concatenation expressions,
and this should significantly improve performance for some applications."


Gary



Mime
View raw message