StringBuffer/Builder vs Collection Access

Derek Foster vapor1 at teleport.com
Mon May 18 11:45:24 PDT 2009


Thanks for researching this, Ruslan.

I note that these results don't seem to include the constructs "SV +=  
SE" or "SV = SV + SE" where SV is a String variable and SE is a String  
expression. These constructs would also be candidates for replacement  
with the new StringBuilder/StringBuffer operators.

Also, any calls to "SBE.setLength(0)" where SBE is an expression of  
type StringBuffer or StringBuilder could be replaced with 'SBE = ""'  
under the current proposal.

Also, any code like "SB foo = new SB();" or "SB foo=new SB(SE)" could  
be replaced with "SB foo = SE" under the current proposal (where SB is  
StringBuffer or StringBuilder and SE is a string expression).

Thanks again for your time spent researching this!

Derek


On May 17, 2009, at 11:40 PM, "Ruslan Shevchenko"  
<rssh at gradsoft.com.ua> wrote:

>
> Also partial results, full data later:
>
> Under simplicified collection element access i understand call of
> Collection.get or List.set or Map.put
>
> Under simplicified StringBuilder/Buffer append: call of
> StringBuilder.append or StringBuffer.append
>
>
> jetty:
> simplicified collection element access  :       241
> simplicified StringBuilder/Buffer syntax        :       363
>
> gwt-user:
> simplicified collection element access  :       324
> simplicified StringBuilder/Buffer syntax        :       216
>
> hibernate:
> simplicified collection element access  :       613
> simplicified StringBuilder/Buffer syntax        :       1128
>
>
>
>
>



More information about the coin-dev mailing list