lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>Perhaps Lua 5 might need string buffers (growable buffer of
>characters), so that string manipulation becomes more efficient.

As discussed before, Lua maintains unique strings and this kills modifiable
strings as a builtin type. Much of the speed in Lua (especially tables)
is due to the uniqueness of string: essentially, string comparisons become
pointer comparisons.

>I read somewhere (but forgot the URL) that Lua performs very well (w.r.t
>other scripting languages) except for string manipulation. But I may
>be wrong!

Possibly because those benchmarks build large strings incrementally,
with many steps. As discussed before here and in the wiki, there are
better ways to do both modifiable strings and incremental strings.

--lhf