[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Preventing Lua scripts that never return from freezing the hostapplication
- From: "Matthew P. Del Buono" <delbu9c1@...>
- Date: Wed, 4 Nov 2009 16:01:15 -0500
Matthew P. Del Buono wrote:
> GrayFace wrote:
>> In this particular case of s..s the concatination shouldn't take much more
>> than Lim*2 time, where Lim is the limit of time a loop may take. At
>> least if
>> time/length dependance is linear enough.
>>
>
> This would be a valid argument the increase of the string length were
> linear. However, it is not. The string length grows at 2^n, which is
> very far from linear.
>
I apologize, I misunderstood your statement. I get what you mean now,
but it's mostly a moot point. The starting point is completely
arbitrary, and fact of the matter is it's possible to construct a
concatenation operation that takes an extremely long time. Point is, Lua
operators are not necessarily fast and negligible operations.
Regards,
-- Matthew P. Del Buono