[XML-SIG] HTML<->UTF-8 'codec'?

Thomas B. Passin tpassin@home.com
Sat, 20 Oct 2001 10:05:45 -0400


[Martin v. Loewis]

>
> Even with these improvements, building up a string by adding tail
> segments requires repeated copying of the string head. This can be
> avoided with a pre-allocated list L, using string.join(L,"") when
> done.
>

We had a thread on this a while ago (I thinkit was this year, but maybe it
was last).  When the string is small it makes no noticeable difference, but
as the string gets larger the speedup of using a list can be dramatic, even
more than an order of magnitude.  Anything more than a few KB for the final
string would probably benefit from the list approach - especially when you
add to the string a character at a time.

Cheers,

Tom P