commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject Re: [lang] FastStringBuffer?
Date Thu, 07 Aug 2003 03:31:35 GMT

Sounds like a good idea to me. Worth knocking the code out, performing
some benchmarks and submitting. If you're offering to create such a thing
:)

As far as I know, it's not been discussed before.

Hen

On Wed, 6 Aug 2003, Chris Feldhacker wrote:

> Maybe I'm missing something, or maybe this has been discussed before, but...
>
> Is there a replacement for StringBuffer someplace, perhaps a
> "FastStringBuffer" class?
>
> I only ask because StringBuffers are used everywhere, even internally by the
> JVM.  However, all of the methods on the StringBuffer class are
> synchronized.  In my experience (and in looking through most of the lang
> code), 99% of the time StringBuffer is only used as a method variable to
> compose a message String; therefore, it is not possible for multiple threads
> to access the same StringBuffer.  So, why not eliminate the synchronized
> method calls and increase performance?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


Mime
View raw message