lua-users home
lua-l archive

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

I wonder if that two-iterator approach (which is a standard way of detecting loops in graphs), even if it might work, might force all users to pay an additional price (overhead of the additional iterator) in the case where there are no loops, which I would assume is the most common case.
It is possible to start the lookup with loop detection when in the current version the error is raised. So doing 2000 normal lookup iterations where no price is payed and after that the cost of the second iterator comes in.