>On Tue, 2002-11-12 at 20:22, Laszlo Hornyak wrote:
>> ok, sorry for the disturbance.
>>
>> Laszlo Hornyak
>>
>> ps:
>> StringBuffering code:
>> time for test: 45479
>>
>> String += code:
>> time for test: 52011
>

>+= is slow
>

>+ is faster.
>

The important thing here are not realy the time it takes to do += or + to strings, the biggest cost in handling strings is the creation and gc

Creation and destruction of string objects costs alot in the FOP since there are huge misuse of them.

se patch 14013 that runs 20-30% faster and the biggest things are optimization of string handling.

So I think StringBuffers shall be used insted of adding strings together.


/Henrik

Reply via email to