[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Plans for version 5.0?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 23 Oct 2002 11:00:33 -0200
> Your implementation is good, of course, but still seems (if I understood
> the algorithm) to suffer (to a lesser extent) of some of the old problems:
> it is quite memory intensive as it uses a table to store parts of the
I don't think so. The table is quite small: Typically around log2 of the
length of the final string, so for a string of 1M you will need only
20 entries. The strings inside it are parts of the final string, so
they use the same space that a buffer would use (but broken in several
> and when closing it, we still have to concatenate the parts,
> generating garbage to collect.
That is true... But it is difficult to anticipate that this will be a
real problem in real applications. (And, in Lua 5, we can use
table.concat to close it more efficiently.)