On Wed, Dec 10, 2008 at 11:29 PM, H. Sasse <[EMAIL PROTECTED]> wrote:
>
> Lua faces a similar problem exacerbated by garbage collection and
> immutable strings. The solution
>
> http://www.lua.org/pil/11.6.html
>

If I understood well, this approach is efficient in Lua because it
avoids taking the worst of their garbage collecting algorithm.
But (and correct me if I'm wrong)  it doesn't avoid the problem that
for each concatenation the contents of the strings are copied into a
new one.

As mentioned above, the use of realloc could speed up a little the
process. But it would still be the same in the worst case scenarios. I
will take a look as how memory is handled for each line. This problem
is very interesting :)

-- 
Matías Larre Borges
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui