lua-users home
lua-l archive

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

* Josh Simmons:

>> You should avoid string copies, perhaps by changing the signature of
>> parse() from parse(string) to parse(string, i, j), where parse() only
>> operates on the substring consisting of the characters [i, j].
> They're not copies, and you can't avoid the work here.

You can surely copy each character at most once, independently of the
structure nesting depth.  This will address the quadratic behavior.