lua-users home
lua-l archive

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


On Mon, Jun 6, 2011 at 12:45 AM, Florian Weimer <fw@deneb.enyo.de> wrote:
> * 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.
>
>

I'm not quite sure I read you, oh yes I do duh. I'll fix that up.

Cheers.